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
/* | |
A komodo edit 5 macro script for coloring javascript, php | |
and css inside html | |
*/ | |
try { | |
/** | |
* @type {Components.interfaces.ISciMoz} | |
*/ | |
var v = ko.views.manager.currentView; |
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
RewriteCond %{HTTP_HOST} !^www.example.com$ | |
RewriteRule ^(.*) http://www.example.com/$1 [QSA,L,R=301] |
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 -*- | |
// function remove_accents() | |
/** | |
* Unaccent the input string string. An example string like `ÀØėÿᾜὨζὅБю` | |
* will be translated to `AOeyIOzoBY`. More complete than : | |
* strtr( (string)$str, | |
* "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ", | |
* "aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn" ); | |
* |
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 -*- | |
# function bench() | |
/** | |
* | |
* @param string $label flag to markup your bench step | |
* @return mixed | |
* @example | |
bench('big ass code N#1 @ '.__LINE__); | |
// some code.. |
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
id.getElementByName 'eddie' | |
Class Block.Struct | |
EndClass | |
Class Item.Model |
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
* html { | |
/* will affect IE6 only */ | |
} | |
*+html, * html { | |
/* will affect IE 7 and older version */ | |
} | |
*+html { | |
/* will affect IE 7 only */ |
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 -*- | |
/*** | |
* | |
* @return bool true if email sent, false otherwise | |
*/ | |
function email($to, $from, $subject, $html, $attachments=array(), | |
$bcc=false, $reply=false ) |
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 | |
$pass = (chr((int)rand(97,122))).(chr((int)rand(67,90))).(rand(1000,9999)); |
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 | |
// Start XML file, create parent node | |
$xml = new XMLWriter(); | |
$xml->openMemory(); // create document in memory (AKA storing into a var) | |
$xml->setIndent(true); // autoindent output | |
$xml->setIndentString(' '); // set kind of indentation | |
$xml->startDocument('1.0','UTF-8'); // start xml declaration with encoding utf-8 |
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 | |
$DESTINATAIRE = '[email protected]'; | |
$SUJET = 'Message reçu depuis '.$_SERVER['HTTP_HOST'].' '; | |
function valid_email($email) { | |
$atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; | |
$domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; | |
$regex = '/^' . $atom . '+' . |
OlderNewer