$ brew install autoconf automake gmp homebrew/versions/bison27 gd freetype t1lib gettext zlib mcrypt
$ git clone --depth=1 https://github.com/php/php-src.git
$ cd php-src
| <?php | |
| $view = preg_replace('/[^a-z]/', '', $_SERVER['REQUEST_URI']) ?: 'index'; | |
| require __DIR__ . '/layout.php'; |
| <?php | |
| set_time_limit(0); | |
| /* ----------------------------- CONFIG -----------------------------*/ | |
| $master_server = "dev2.muvik.tv"; | |
| $file_server = 1; | |
| // -- API MASTER | |
| define('MASTER_CONVERT_RESULT', 'http://'.$master_server.'/api/convert_result/dota2/', true); | |
| define('MUVIK_GET_TASK', 'http://'.$master_server.'/api/task/dota2/?', true); |
| var MooQuery = function (query) { | |
| this.elements = Array.prototype.splice.call(document.querySelectorAll(query), 0); | |
| }; | |
| MooQuery.prototype = { | |
| constructor: MooQuery, | |
| each: function (callback) { | |
| this.elements.map(callback); | |
| }, | |
| }; |
| class Array | |
| def deep_dup | |
| self.map do |el| | |
| if !el.is_a? Array | |
| el | |
| elsif self.none? {|el| el.is_a? Array} | |
| el.map {|el2| el2} | |
| else | |
| el.deep_dup |
| function hasClass(selector,str){ | |
| var el = document.querySelector(selector); | |
| var className = el.className(); | |
| var classArray = className.split(' ') | |
| if(classArray.indexOf(str) !== -1){ | |
| return true; | |
| } | |
| return false; | |
| } |
| ... or more accurately, asleep at the wheel! | |
| _______________________________________________________ | |
| _________/ STORY TIME (feel free to skip this if you don't care) \__________ | |
| | | | |
| | Recently, I made a quick analysis of all of the public projects listed | | |
| | on HackerOne. https://gist.github.com/sarciszewski/04ee71ad2bcddc9c33b9 | | |
| | | | |
| | If you scroll to the bottom, I listed several projects in the "sweet | | |
| | spot": open source AND a minimum bounty. Outside of the Internet Bug | | |
| | Bounty project, there are only two projects listed: WP-API and Ian Dunn (a | |
| <?php | |
| /** | |
| * Two functions to work with multidimensional arrays. | |
| * md_get to get array value using key separated by '.' | |
| * md_set to set array value using key separated by '.' | |
| * Easy, huh? | |
| * | |
| * @author volter9 | |
| */ |
| var svg = document.querySelector( "svg" ); | |
| var svgData = new XMLSerializer().serializeToString( svg ); | |
| var canvas = document.createElement( "canvas" ); | |
| var ctx = canvas.getContext( "2d" ); | |
| var img = document.createElement( "img" ); | |
| img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) ); | |
| img.onload = function() { |
| var Promise = function(wrappedFn, wrappedThis) { | |
| this.then = function(wrappedFn, wrappedThis) { | |
| this.next = new Promise(wrappedFn, wrappedThis); | |
| return this.next; | |
| }; | |
| this.run = function() { | |
| wrappedFn.promise = this; | |
| wrappedFn.apply(wrappedThis); | |
| }; |