start new:
tmux
start new with session name:
tmux new -s myname
// origin: http://www.google.com/support/forum/p/Chrome/thread?tid=1a37ccbdde5902fd&hl=en | |
javascript: | |
timeout=prompt("Set timeout [s]"); | |
current=location.href; | |
if(timeout>0) | |
setTimeout('reload()',1000*timeout); | |
else | |
location.replace(current); | |
function reload(){ |
<style> | |
pre{ | |
margin: 0; | |
padding: 7px 0; | |
} | |
</style> | |
<?php | |
function rgb2hsv ($RGB) | |
{ |
if test -z $1 | |
then | |
echo "$0 : You must set a project name" | |
exit 1 | |
else | |
if test -d /srv/sites/$1/www/ | |
then | |
# fix permission issues | |
echo "fix permissions" | |
cd /srv/sites/$1/ |
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
Artist: https://twitter.com/mandylauderdale | |
I wouldn't be so alone | |
If my Github followers lived in my home | |
Alex Russell would send a pull request | |
But I'd be too busy | |
Return to San Francisco by nine | |
That guy Brendan Eich, did he see my sign | |
He makes me smile all the time | |
His lines of code would compliment mine |
/*global $, Backbone, window, console, WebSocket, _ */ | |
$(function () { | |
"use strict"; | |
// for better performance - to avoid searching in DOM | |
var $content = $('#content') | |
, $input = $('#input') | |
, $status = $('#status') | |
// my color assigned by the server |
DBNAME="foodb" | |
# This script installs dependencies for CommCare HQ on Ubuntu 12.04 (Java, | |
# Jython, couchdb, couchdb-lucene, less, uglifyjs, and various python packages) | |
# and sets couchdb and couchdb-lucene up to automatically run on startup. It | |
# also creates postgres (user 'django', pass 'django') and couchdb databases | |
# named according to $DBNAME as specified above. | |
# Before running, you must download the following files to the script's | |
# directory: |
#!/usr/bin/php | |
<?php | |
/** | |
* Calibration: depending on your fonts and terminal colors, you may want to change these | |
*/ | |
global $PIXELS, $COLORS, $HSV_COLORS; | |
$YSCALE = 12; | |
$XSCALE = 5; |
<?php | |
define('PROXY', 'proxy'); | |
define('PORT', 8080); | |
if (!function_exists('getallheaders')) | |
{ | |
function getallheaders() | |
{ | |
$headers = []; |