As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
var util = require('util') | |
function hook_stdout(callback) { | |
var old_write = process.stdout.write | |
process.stdout.write = (function(write) { | |
return function(string, encoding, fd) { | |
write.apply(process.stdout, arguments) | |
callback(string, encoding, fd) | |
} |
function lshift(x, by) | |
return x * 2 ^ by | |
end | |
function rshift(x, by) | |
return math.floor(x / 2 ^ by) | |
end |
/** | |
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns. | |
**/ | |
// Constructor. | |
var Interface = function (name, methods) { | |
if (arguments.length != 2) { | |
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2."); | |
} | |
this.name = name; |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
### Check me into the root of the repo | |
### as .gitattributes | |
*.doc diff=astextplain | |
*.DOC diff=astextplain | |
*.docx diff=astextplain | |
*.DOCX diff=astextplain | |
*.dot diff=astextplain | |
*.DOT diff=astextplain |
function clone (t) -- deep-copy a table | |
if type(t) ~= "table" then return t end | |
local meta = getmetatable(t) | |
local target = {} | |
for k, v in pairs(t) do | |
if type(v) == "table" then | |
target[k] = clone(v) | |
else | |
target[k] = v | |
end |
--[[ deepcopy.lua | |
Deep-copy function for Lua - v0.2 | |
============================== | |
- Does not overflow the stack. | |
- Maintains cyclic-references | |
- Copies metatables | |
- Maintains common upvalues between copied functions (for Lua 5.2 only) | |
TODO |