This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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(); |
This file contains hidden or 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
| from models import Ent | |
| def randomstr(): | |
| import random | |
| alphabet = u'abcdefghijklmnopq rstuvwxyzéièùïà\'"' | |
| alphabet + alphabet.upper() | |
| string='' | |
| for count in xrange(1,50): | |
| for x in random.sample(alphabet,random.randint(1,15)): | |
| string+=x |
This file contains hidden or 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
| (function($){ | |
| $.fn.textspinner = function(options) { | |
| var defaults = { | |
| fadeInTime: 200, | |
| fadeOutTime: 200, | |
| showDelay: 200 |
This file contains hidden or 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 | |
| /** | |
| * log into firebug/firephp extensions | |
| * | |
| * @see http://www.firephp.org | |
| * @example | |
| firephp($var); | |
| firephp($var, LOG_ERR); |