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
| // string to code | |
| arr = [].map.call('my string', (function(a){return a.charCodeAt(0)})); | |
| // code to string | |
| String.fromCharCode.apply(null, arr) |
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 | |
| list($width, $height) = getimagesize($urlImg); | |
| $ratio = $width / $height; | |
| $rationLarge = 560 / 292; | |
| $rationSmall = 100 / 72; | |
| if (abs($ratio / $rationLarge) < abs($ratio / $rationSmall)) { | |
| return [560, 292]; |
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
| C:\bin>echo @php "%~dp0composer.phar" %*>composer.bat |
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($) { | |
| var o = $({}); | |
| $.subscribe = function() { | |
| o.on.apply(o, arguments); | |
| }; | |
| $.unsubscribe = function() { | |
| o.off.apply(o, arguments); | |
| }; | |
| $.publish = function() { | |
| o.trigger.apply(o, arguments); |
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
| <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"> |
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
| chcp 1252 |
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 () { | |
| var root = $(document.getElementsByTagName('body')); | |
| var watchers = []; | |
| var f = function (element) { | |
| if (element.data().hasOwnProperty('$scope')) { | |
| angular.forEach(element.data().$scope.$$watchers, function (watcher) { | |
| watchers.push(watcher); | |
| }); | |
| } |
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
| angular.module('app', []) | |
| .config(function($interpolateProvider){ | |
| $interpolateProvider.startSymbol('[[').endSymbol(']]'); | |
| }); |
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 getGUID() { | |
| return 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.replace(/[x]/g, function(c) { | |
| var num = Math.random() *16 | 0, v = c === 'x' ? num : (num&0x3|0x8); | |
| return v.toString(16); | |
| }); | |
| } | |
| function getGUID() { | |
| function fd() { |
NewerOlder