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 | |
| /** | |
| * ----------------------------------------------------------------------------------------- | |
| * Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
| * ----------------------------------------------------------------------------------------- | |
| */ | |
| // HTML Minifier | |
| function minify_html($input) { |
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 | |
| // Based on <https://github.com/mecha-cms/x.minify> | |
| namespace x\minify\_ { // start namespace | |
| $n = __NAMESPACE__; | |
| \define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
| \define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
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 | |
| /** | |
| * On-the-fly CSS Compression | |
| * Copyright (c) 2009 and onwards, Manas Tungare. | |
| * Creative Commons Attribution, Share-Alike. | |
| * | |
| * In order to minimize the number and size of HTTP requests for CSS content, | |
| * this script combines multiple CSS files into a single file and compresses | |
| * it on-the-fly. | |
| * |
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 | |
| // @source: http://www.paulund.co.uk/resize-image-class-php | |
| /** | |
| * Resize image class will allow you to resize an image | |
| * | |
| * Can resize to exact size | |
| * Max width size while keep aspect ratio | |
| * Max height size while keep aspect ratio | |
| * Automatic while keep aspect ratio |
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 | |
| $timeout = 300; // 5 minutes | |
| $time = time(); | |
| $ip = $_SERVER["REMOTE_ADDR"]; | |
| $file = "users.txt"; | |
| $arr = file($file); | |
| $users = 0; | |
| for ($i = 0; $i < count($arr); $i++){ | |
| if ($time - intval(substr($arr[$i], strpos($arr[$i], " ") + 4)) > $timeout){ |
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
| jQuery( function ( $ ) { | |
| var originalXhr = $.ajaxSettings.xhr; | |
| $.ajaxSetup( { | |
| progress: function () {}, | |
| uploadprogress: function () {}, | |
| xhr: function () { | |
| var req = originalXhr(), | |
| self = this; | |
| if ( req ) { |
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> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
| <meta charset=utf-8 /> | |
| <title>Live Word and Character Counter using jQuery</title> | |
| <style> | |
| textarea{ |
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 retrieve_shortened_link($shortUrl){ | |
| $headers = get_headers($shortUrl, 1); | |
| if(is_array($headers['Location'])){ | |
| return $headers['Location'][0]; | |
| }else{ | |
| return $headers['Location']; | |
| } | |
| } |
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 return array ( | |
| 'url' => 'https://xaviesteve.com/', | |
| 'content' => '<!doctype html><html>...</html>', | |
| 'cookies' => '__cfduid=d3fa669e1069e72c2e47d127ab9b8e11f1465390629', | |
| 'http_code' => 200, | |
| 'content_type' => 'text/html; charset=UTF-8', | |
| 'header_size' => 578, | |
| 'request_size' => 229, | |
| 'filetime' => -1, | |
| 'ssl_verify_result' => 0, |
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 PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
| <script type="text/javascript" src="jquery.js"></script> | |
| <script type="text/javascript"> | |
| var str = '1'; | |
| for (var dup = 0; dup < 20; dup++) { | |
| str += str; |
NewerOlder