start new:
tmux
start new with session name:
tmux new -s myname
ul.tags { | |
display: inline; | |
margin: 0; | |
padding: 0; | |
} | |
ul.tags li { | |
display: inline; | |
list-style: none; | |
margin: 0; |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
/* Gmail style scrollbar */ | |
::-webkit-scrollbar { | |
width: 12px | |
} | |
::-webkit-scrollbar-thumb { | |
border-width: 1px 1px 1px 2px | |
} | |
::-webkit-scrollbar-track { | |
border-width: 0 | |
} |
<?php | |
/** | |
* @file | |
* | |
* Minimal AJAX page. Call like this: | |
* $.ajax({ | |
* type: 'GET', | |
* url: '/drupal-ajax.php?param1=... | |
* data: {}, |
#!/bin/bash | |
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)" | |
let secs=$((${upSeconds}%60)) | |
let mins=$((${upSeconds}/60%60)) | |
let hours=$((${upSeconds}/3600%24)) | |
let days=$((${upSeconds}/86400)) | |
UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"` | |
# get the load averages | |
read one five fifteen rest < /proc/loadavg |
app | |
index.html | |
app.js | |
css/ | |
js/ | |
controllers/ | |
youtubeSearch.js | |
services/ | |
views/ | |
main.html |
<?php | |
//Helper function to convert bigint to ip adress | |
function int2ip($intip){ | |
$ipVal = $intip; | |
$ipArr = array(0 => floor($ipVal/0x1000000) ); | |
$ipVint = $ipVal-($ipArr[0]*0x1000000); // for clarity | |
$ipArr[1] = ($ipVint & 0xFF0000) >> 16; | |
$ipArr[2] = ($ipVint & 0xFF00 ) >> 8; | |
$ipArr[3] = $ipVint & 0xFF; | |
$ipDotted = implode('.', $ipArr); |
/** | |
* Description: | |
* removes white space from text. useful for html values that cannot have spaces | |
* Usage: | |
* {{some_text | nospace}} | |
*/ | |
app.filter('nospace', function () { | |
return function (value) { | |
return (!value) ? '' : value.replace(/ /g, ''); |