ssh -L 12345:localhost:5984 [email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[].forEach.call($$("*"),function(a){ | |
a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var http = require('http'); | |
var fs = require('fs'); | |
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var nodeCouchDB = require("node-couchdb"); | |
var couch = new nodeCouchDB("192.168.0.12", 5984); | |
var app = express(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function once(fn, context) { | |
var result; | |
return function() { | |
if(fn) { | |
result = fn.apply(context || this, arguments); | |
fn = null; | |
} | |
return result; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Search your command line history | |
history | grep 'Whatever' | |
# Discover what's eating your memory | |
top -o vsize | |
# Copy to the clipboard | |
echo "Boom" | pbcopy | |
# unzip archive into current directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -m SimpleHTTPServer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find in file. (Grep) | |
Select-String stringYouWantToSearch .\fileYouWantToSearch.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Links | |
@mixin link($color, $percent){ | |
color: $color; | |
&:active, | |
&:focus, | |
&:hover { | |
color: darken($color, $percent); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// icon colouring. | |
$icon-color-set: (black $black), | |
(white $white), | |
(green $green), | |
(orange $orange), | |
(red $red), | |
(utility-blue $utility-blue), | |
(ocean-blue $ocean-blue), | |
(transition-blue2 $transition-blue2), | |
(transition-blue3 $transition-blue3), |
- To start editing run the following replacing the "testuser" with your desired runtime user for the node process. If you choose a different user other then yourself, you will have to run this with sudo.
$ crontab -u testuser -e
-
If you have never done this before, it will ask you which editor you wish to edit with. I like vim, but will recommend nano for ease of use.
-
Once in the editor add the following line:
@reboot /usr/local/bin/forever start /your/path/to/your/app.js
- Save the file. You should get some feedback that the cron had been installed.