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
| <!DOCTYPE html> | |
| <html><head><title>Google Maps</title> | |
| <meta charset="utf-8" /> | |
| <style type="text/css">html,body{width:100%;height:100%;margin:0;padding:0;}</style> | |
| <meta name="robots" content="noindex, nofollow" /> | |
| <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1" /> | |
| <script type="text/javascript"> | |
| var address = getParamter('q'); | |
| document.title = address + ' - ' + document.title; | |
| function getParamter (name) { |
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.contenteditable = function () { | |
| return this.each(function () { | |
| var me = $(this), initialValue; | |
| me.attr({ | |
| contenteditable: true, | |
| spellcheck: false | |
| }); | |
| me.bind({ | |
| focus: function () { |
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 | |
| /** | |
| * Example: | |
| * getApkVersion('gmail.apk', 'com.google.android.gm') // "2.3.5.2" | |
| */ | |
| function getApkVersion ($fileName, $packageName) { | |
| if (!is_file($fileName)) { | |
| throw new \Exception('getApkVersion: File not found: ' . $fileName); | |
| } |
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
| $.fn.unselectable = function () { | |
| var returnFalseFn = function() { return false; }; | |
| $(this).attr('unselectable', 'on').css({ | |
| MozUserSelect: 'none', | |
| KhtmlUserSelect: 'none', | |
| WebkitUserSelect: 'none', | |
| userSelect: 'none' | |
| }).each(function() { | |
| this.onselectstart = returnFalseFn; | |
| if ($.browser.opera) { |
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 | |
| class SlowPagesLog { | |
| private static $limit = 5; | |
| private static $logFile = 'log/slow-pages.log'; | |
| public static function init () { | |
| register_shutdown_function('SlowPagesLog::finish'); | |
| } | |
| public static function finish () { | |
| $time = microtime(true) - $_SERVER{'REQUEST_TIME'}; |
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 | |
| $str = 'Árvíztűrő tükörfúrógép'; | |
| // 'Arv'izt"ur"o t"uk"orf'ur'og'ep | |
| echo iconv('utf-8', 'ASCII//TRANSLIT//IGNORE', $str), '<br />'; | |
| // Arvizturo tukorfurogep | |
| echo preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', iconv('utf-8', 'ASCII//TRANSLIT//IGNORE', $str)); |