Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
var env = process.env; | |
Object.keys(env).forEach(function(key) { | |
console.log('export ' + key + '="' + env[key] +'"'); | |
}); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This has been incorporated in a small library.
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
function transfer | |
if test (count $argv) -eq 0 | |
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" | |
return 1 | |
end | |
## get temporarily filename, output is written to this file show progress can be showed | |
set tmpfile ( mktemp -t transferXXX ) | |
## upload stdin or file |
window.test = tape; | |
// Concatenative inheritance example; | |
var Animal = { | |
animalName: 'animal', | |
describe: function() { | |
return 'This is an ' + this.animalName + '. '; | |
} | |
}; |
function fadeOut(el){ | |
el.style.opacity = 1; | |
(function fade() { | |
if ((el.style.opacity -= .1) < 0) { | |
el.style.display = "none"; | |
} else { | |
requestAnimationFrame(fade); | |
} | |
})(); |
/* | |
This is the barebones proof of concept: | |
*/ | |
const gulp = require('gulp'); | |
const p = { | |
dashboard: { | |
orig: ['public/dashboard/scss/style.scss', 'public/dashboard/styles/*.css'], | |
dest: 'public/dashboard/css/', |