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
if (get_magic_quotes_gpc()) { | |
function strip_the_slashes($array) { | |
foreach($array as $key => $value) { | |
if (is_array($value)) { | |
$value = strip_the_slashes($value); | |
} else { | |
$value = stripslashes($value); | |
} | |
$array[$key] = $value; | |
} |
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
mysql_query('SET NAMES utf8'); | |
mysql_query('SET CHARACTER SET utf8'); |
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
git svn init --trunk=trunk/ --branches=branches/ --tags=tags/ --no-metadata http://svn.example.com/ target_tmp_path | |
git config svn.authorsfile svn_users.txt | |
git svn fetch | |
git branch -m master tmp-5.x-0.x | |
git checkout -b master trunk | |
git tag 5.x-0.1 fa50b543e4570b5bd3197b301485b2d3ff88ccdd | |
cd .. | |
git clone target_tmp_path target_path |
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 _strings = [ | |
"Msxml2.XMLHTTP", //0 0x0 | |
"Microsoft.XMLHTTP", | |
"connect", | |
"toUpperCase", | |
"GET", | |
"?", //5 0x5 | |
"open", | |
"", | |
"Method", |
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
/*global jQuery */ | |
jQuery(function () { | |
if (document.referrer) { | |
var reg = new RegExp("https?:\/\/([^/]+)"), | |
domain = reg.exec(window.location.href), | |
refdomain = reg.exec(document.referrer); | |
if (domain[1] === refdomain[1]) { | |
jQuery('.back-link').attr('href', document.referrer); | |
} |
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
// ==UserScript== | |
// @name Localhost | |
// @namespace Perifer | |
// @include http://*.local/* | |
// ==/UserScript== | |
/* | |
Displays a bagde when surfing .local pages. | |
*/ |
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 | |
/** | |
* Implementation of hook_nodeapi(). | |
*/ | |
function foobar_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { | |
switch ($op) { | |
case 'presave': | |
$node->language = ''; | |
break; | |
} |
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 | |
// Smart summaries that only cuts where there's a space. | |
$content ="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nula. pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit |
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 | |
if ($you->isGeekGirl()) { | |
$extraPoints += 10; | |
} |
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 humanizedLite = function (elem, speed) { | |
setTimeout(function () { | |
$(document).one('mousemove', function () { | |
elem.slideUp(speed ? speed : 400, function () { | |
elem.remove(); | |
}); | |
}); | |
}, 1500); | |
}; |
OlderNewer