start new:
tmux
start new with session name:
tmux new -s myname
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="[add your bin description]"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
Please follow these steps to set up your nick and configure your client. Check off each step to make sure it's been done:
Select a permanent, master nickname. If the nickname you want is registered but has expired, just ask a staffer and in most cases, we will be happy to drop it for you.
Please avoid using the name of a community project or trademarked entity, to avoid conflicts. Write down your password and be sure to keep the sheet of paper in a safe place.
Register your IRC nick:
var Pet = function (n) { | |
this.name = n; | |
this.getName = function() { | |
return this.name; | |
} | |
} | |
Pet.prototype.getName = function() { | |
return this.name; | |
} |
#! /bin/bash | |
dir=$1 | |
find $dir -type d -maxdepth 1 -mindepth 1 -print0 | while IFS= read -r -d $'\0' line; do | |
echo "$line" | |
ls -R "$line" | wc -l | |
done |
/** | |
* An implementation for Mergesort. Less efficient | |
* than Quicksort. Again, you'd just use Array.sort | |
* but if you found yourself unable to use that | |
* there's always this option. | |
* | |
* Tests with: | |
* | |
* var array = []; | |
* for(var i = 0; i < 20; i++) { |
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012 | |
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
(function(host) { | |
function Crawler() { | |
this.visitedURLs = {}; | |
}; | |
0 2 * * * /usr/bin/find /FIXME/PATH/TO/DOMAIN.COM/var/session -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 -exec rm {} \; >/dev/null 2>&1 |
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm update npm -g; npm update -g; sudo gem update --system; sudo gem update' |
#!/bin/sh | |
eth=$(ifconfig | pcregrep -M -o '^[^\t:]+:([^\n]|\n\t)*status: active'| egrep -o -m 1 '^[^\t:]+') && nmap -sP $(ifconfig $eth | grep -w 'inet' | cut -d' ' -f2 | cut -d'.' -f1-3)".1/24" |