Skip to content

Instantly share code, notes, and snippets.

@mapix
mapix / pr.md
Last active December 16, 2015 05:49 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

#!/usr/bin/env bash
# gsettings list-recursively org.gnome.system.proxy
# Change de ip address and port number accordingly.
function myProxyOn() {
gsettings set org.gnome.system.proxy mode 'manual' # ' manual / nome / automatic '
gsettings set org.gnome.system.proxy.http host '10.0.0.1'
gsettings set org.gnome.system.proxy.http port 8080
gsettings set org.gnome.system.proxy.https host '10.0.0.1'
@mapix
mapix / 0_reuse_code.js
Created November 4, 2013 02:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mapix
mapix / zsh.md
Created January 2, 2014 02:17 — forked from tsabat/zsh.md

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/bin/bash
if [[ `uname -s` == 'Darwin' ]]; then
brew update
brew install libtool autoconf automake
else
sudo apt-get update
sudo apt-get install -y libtool autoconf automake uuid-dev git-core
fi
@mapix
mapix / INSTALL
Last active August 29, 2015 14:15 — forked from mat/INSTALL
TODO:
- edit /opt/statsd/local.js
- correct the graphite host to localhost
- if desired, put 'debug: true' in there
- make the box accessible via the hostname 'graphite'
- update conf/storage-schemas.conf, see example for these retention rules:
6 hours of 10 second data
1 week of 1 minute data
5 years of 10 minute data
@mapix
mapix / .gitconfig
Last active August 29, 2015 14:15 — forked from mat/.gitconfig
[alias]
# bread and butter
st = status
s = status -sb
d = diff
dc = diff --cached
p = pull --rebase
ir = rebase -i origin/master
amend = commit --amend
l = log --pretty=format:'%Cred%h%Creset %C(bold blue)<%an> -%C(yellow)%d%Creset %s %Cgreen(%cr) %Creset' --abbrev-commit --date=relative
@mapix
mapix / ssh_client.go
Created March 1, 2016 08:31 — forked from iamralch/ssh_client.go
SSH client in GO
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
@mapix
mapix / sshtunnel.go
Created March 1, 2016 08:38 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"log"
"bufio"
"time"
"os"
"fmt"
"io"
"net"