This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# vmstat_tool.sh | |
# vmstat parser script. Makes the information easily readable. | |
# Ensure that the number of loops and delay parameters | |
# were passed to this script | |
# examine output with : nohup vmstat_tool.sh 100 > ./vmstat.log & | |
if [ $# -ne 1 ] | |
then | |
echo "Usage: $0 count" | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.*; | |
import java.lang.InterruptedException; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.firefox.FirefoxDriver; | |
import org.openqa.selenium.firefox.FirefoxProfile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
*/ | |
function my_exception_handler($exception) | |
{ | |
print '<pre>'; | |
print $exception; | |
print '</pre>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get and run a snippets from your toolbox. | |
* | |
* First snippet name is guess by word under your cursor or before your | |
* cursor if none selected. In our example : "fooBar" | |
* The script search a snippet named : | |
* 1. the word join with the language name (lowercase) -> "php_fooBar" | |
* 2. the snippet name with preceding joker (def "any_") -> "any_fooBar" | |
* | |
* the snippet is run if found, and nothing happen otherwise (except a nice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filename = ko.views.manager.currentView.koDoc.baseName, | |
path = ko.views.manager.currentView.koDoc.displayPath; | |
/* | |
Set this to the path of your local directory where you want to backup your files | |
*/ | |
var backupLocation = "/Users/evaisse/Library/Application Support/" | |
+ "KomodoEdit/autobackup"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* get file mimetype | |
* | |
* Tries to get mime data of the file. | |
* | |
* @param str $filepath | |
* @return str mime-type of the given file, or false if nothing found | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # -*- coding:utf-8 -*- | |
/** | |
* handle exceptions, errors ( convert them into ErrorException instances) , | |
* even fatal errors too via shutdown registrered function. | |
* Provide a pretty smart debug pageon demand | |
* | |
* @example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Struct.Import | |
a(): 5,6,7 | |
# | |
IF | |
a(): ENDDEF () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* get French date | |
* | |
* @example | |
* frenchDate(); // Lundi 13 Octobre | |
* | |
* @param date {Date} a date object, if none provided, now() is used | |
* @returns {String} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$form = Form::create()->setMethod(Form::POST); | |
$form->addTextField('name', 'Name')->validRequired(); | |
$form->addTextField('age', 'Age')->validNumeric(); | |
$form->addSelectFIeld('rank','Rank :')->setOptions( 'User', 'Admin', 'Unknow' ); | |
$form->addTextField('autre_fonction', 'Autre fonction:'); | |
$form->addTextAreaField('adresse','Adresse:'); | |
$form->addNumericField('code_postal','Code postal:')->setAttribute('size',5)->validSize(5); | |
$form->addTextField('tel_perso','Téléphone personnel:')->validPhoneNumber(); |