start new:
tmux
start new with session name:
tmux new -s myname
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork git@github...my-fork.git |
str = ''; | |
for(var i=0; i<1000; i++){ | |
str += "INSERT INTO VALUES ("+i+1000+")...;"; | |
} | |
document.getElementsByTagName('body')[0].innerHTML = "<textarea>"+str+"</textarea>"; |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
function test() { | |
var requestURL = "https://api.xero.com/api.xro/2.0/Accounts", | |
timestamp = (new Date().valueOf()/1000).toFixed(0), | |
nonce = createGuid(), | |
key = "consumer key from xero private app", | |
publickey = "content of publickey.cer", | |
requestData = { | |
"method": "GET", | |
"contentType": "application/xml", | |
"headers": { |
package main | |
import ( | |
"log" | |
"net/mail" | |
"encoding/base64" | |
"net/smtp" | |
"fmt" | |
"strings" |
exec { "sed -i 's/www-data/vagrant/g' /etc/apache2/envvars": | |
onlyif => "/bin/grep -c 'www-data' /etc/apache2/envvars", | |
notify => Service['apache2'], | |
require => Package['apache2'], | |
} |
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'https://vim.googlecode.com/hg/', :revision => '6c318419e331' | |
version '7.3.515' | |
def features; %w(tiny small normal big huge) end | |
def interp; %w(lua mzscheme perl python python3 tcl ruby) end | |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro | |
# | |
WP_OWNER=changeme # <-- wordpress owner | |
WP_GROUP=changeme # <-- wordpress group | |
WP_ROOT=/home/changeme # <-- wordpress root directory |
package main | |
import ( | |
"log" | |
"math" | |
) | |
func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
var round float64 | |
pow := math.Pow(10, float64(places)) |