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
/* | |
* def.js: Simple Ruby-style inheritance for JavaScript | |
* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(global) { | |
// used to defer setup of superclass and plugins | |
var deferred; |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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) | |
} |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
int k; | |
double sin() ,cos(); | |
main(){ | |
float A=0, B=0, i, j, z[1760]; | |
char b[1760]; | |
printf("\x1b[2J"); | |
for(; ; ) { | |
memset(b,32,1760); | |
memset(z,0,7040); | |
for(j=0; 6.28>j; j+=0.07) { |
main(argc, argv) | |
int argc; | |
char *argv[]; | |
{ | |
int i; | |
argc--; | |
for(i=1; i<=argc; i++) | |
printf("%s%c", argv[i], i==argc? '\n': ' '); | |
} |
#!/usr/bin/env python | |
import os | |
import shlex | |
import struct | |
import platform | |
import subprocess | |
def get_terminal_size(): | |
""" getTerminalSize() |
/* touch -- change modification and access times of files | |
Copyright (C) 1987, 1989-1991, 1995-2005, 2007-2011 Free Software | |
Foundation, Inc. | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
var express = require('express'); | |
var app = module.exports = express.createServer(); | |
// Configuration | |
app.configure(function(){ | |
app.set('view engine', 'mustache'); | |
app.set('views', __dirname + '/views'); | |
app.register(".mustache", require('stache')); |