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 xhr(url, post) { | |
| var req = window.ActiveXObject | |
| ? new ActiveXObject('Microsoft.XMLHTTP') | |
| : new XMLHttpRequest(); | |
| if (post) { | |
| req.open("POST", url, true); | |
| req.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); | |
| req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
| req.setRequestHeader('Connection', 'close'); | |
| req.send(post); |
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
| errorOccurred = lastErrorOccurred = new Date().getTime(); | |
| _back = function(h) { | |
| if (_backOk) { | |
| if (_backCallback) { | |
| _backCallback(); | |
| _backCallback = null; | |
| } | |
| var hh = parseInt(h); | |
| var m = $.browser.netscape ? 2 : $.browser.msie ? 3 : 7; | |
| if (hh > m) { |
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
| javascript:(function(){zoomFile.size=zoomFile.maxSize;top.location.href=zoomFile.mGetImageURL()})(); |
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 | |
| function geocode_address($address) { | |
| $output = array('address' => $address); | |
| $response = json_decode(file_get_contents("http://maps.googleapis.com/maps/api/geocode/json?address=" . urlencode($address) . "&sensor=false")); | |
| switch ($output['status'] = $response->status) { | |
| case 'OK': | |
| $output['latitude'] = $response->results[0]->geometry->location->lat; | |
| $output['longitude'] = $response->results[0]->geometry->location->lng; | |
| $output['location_type'] = $response->results[0]->geometry->location_type; |
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 | |
| function utf8_translit($string) { | |
| $characters = array( | |
| #"" /* 0080 '<control>' */ => "", | |
| #"" /* 0081 '<control>' */ => "", | |
| #"" /* 0082 'BREAK PERMITTED HERE' */ => "", | |
| #"" /* 0083 'NO BREAK HERE' */ => "", | |
| #"" /* 0084 '<control>' */ => "", | |
| #"" /* 0085 'NEXT LINE (NEL)' */ => "", |
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
| diff -rupN original/ new/ > original.patch |
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
| PURGE BINARY LOGS BEFORE '2011-10-30 10:06:06'; |
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
| find . -type f -exec chmod 644 {} \; | |
| find . -type d -exec chmod 755 {} \; |
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 | |
| define('FLAG_MATCHED', 1 << 0); | |
| class StringScanner implements ArrayAccess | |
| { | |
| protected | |
| $str = '', | |
| $len = 0, | |
| $flags, |
NewerOlder