Open terminal
sudo add-apt-repository ppa:webupd8team/sublime-text-2 sudo apt-get update sudo apt-get install sublime-text
| ;[Element].forEach(function(self){ | |
| self.prototype.eventListenerList = {}; | |
| self.prototype._addEventListener = self.prototype.addEventListener; | |
| self.prototype.addEventListener = function(type, handle, useCapture) { | |
| useCapture = useCapture === void 0 ? false : useCapture; | |
| var node = this; | |
| node._addEventListener(type, handle, useCapture); |
| <?php | |
| /** | |
| * Creating MongoDB like ObjectIDs. | |
| * Using current timestamp, hostname, processId and a incremting id. | |
| * | |
| * @author Julius Beckmann | |
| */ | |
| function createMongoDbLikeId($timestamp, $hostname, $processId, $id) | |
| { |
| Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User | |
| Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User | |
| Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User | |
| [ | |
| { | |
| "button": "button1", | |
| "count": 1, | |
| "modifiers": ["ctrl"], | |
| "press_command": "drag_select", |
| <?php | |
| class HashTable { | |
| private $_array = array(); | |
| private $_size = 10000; | |
| public function __construct($size=0) { | |
| $size = (int)$size; | |
| if ($size > 0) { |
| /* | |
| Allows for ajax requests to be run synchronously in a queue | |
| Usage:: | |
| var queue = new $.AjaxQueue(); | |
| queue.add({ | |
| url: 'url', |
| var docmode = document.documentMode; | |
| // Does the browser support window.onhashchange? | |
| // Note that IE8 running in IE7 compatibility mode reports true for 'onhashchange' in window, | |
| // even though the event isn't supported, so also test document.documentMode. | |
| if ('onhashchange' in window && (docmode === undefined || docmode > 7 )) { | |
| window.onhashchange = checkHash; | |
| } | |
| // IE7 doesn't support the hashchange event so we fall back to standard polling technique | |
| else { |
| /* | |
| A single regex to parse and breakup a full URL including query parameters and anchors e.g. | |
| https://www.google.com/dir/1/2/search.html?arg=0-a&arg1=1-b&arg3-c#hash | |
| */ | |
| Url.regex = /^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$/; | |
| url: RegExp['$&'], | |
| protocol: RegExp.$2, | |
| host: RegExp.$3, |