It's a bundle of documentation of languages, projects and other stuff. Easily searchable and can be used offline.
Download: https://devdocs.io
It's a bundle of documentation of languages, projects and other stuff. Easily searchable and can be used offline.
Download: https://devdocs.io
| (function() { | |
| 'use strict'; | |
| function getType(src) { | |
| return src.match(/\.([^\.\?]+)(?:\?.*)?$/)[1]; | |
| } | |
| function injectContent(content, type) { | |
| if (type === 'css') { | |
| var style = document.createElement('style'); |
| ' VBS Script to get the Windows(R) 7 Product Key from a PC's registry. | |
| ' | |
| ' Save the VBScript as "getWin7Key.vbs" somewhere on your Windows7 PC. | |
| ' Now, when you double-click the local script file an alertbox pops up | |
| ' displaying the product key stored in the machine's Windows registry. | |
| Set WshShell = WScript.CreateObject("WScript.Shell") | |
| KeyPath = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId" | |
| MsgBox ExtractKey(WshShell.RegRead(KeyPath)) |
| String.prototype.format = function (obj) { | |
| /** | |
| * Does the same as a simple form of python "".format | |
| * that will not work for anything else than number or string. | |
| * Array form : | |
| * "I have {} replacements to {}".format("two", "make") | |
| * "I have {} replacements to {}".format(["two", "make"]) | |
| * "I have {0} replacements to {1}".format(["two", "make"]) | |
| * Dict form : | |
| * "Hello {name} !".format({name: "Bob"}); |
| # download and install Oh-my-ZSH | |
| curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh | |
| # make zsh your default shell | |
| chsh -s /bin/zsh |
This gist assumes:
| /* | |
| From: http://devoracles.com/the-best-method-to-check-for-internet-explorer-in-javascript | |
| "I declared a new variable, called IE, which has the value a comment block followed by ‘false‘. | |
| The above variable will be understood by IE: var IE = !false, because Internet Explorer uses | |
| JScript — a Javascript-like dialect of the standard ECMAScript — instead of Javascript which is | |
| used by all the other browsers. JScript can parse the comments, just like Internet Explorer (see | |
| conditional HTML comments post). This is a unique feature of IE, none of the other browsers can do it, | |
| so Firefox, Chrome, Safari, Opera, all will understand the above declaration as IE = false." | |
| */ |