Skip to content

Instantly share code, notes, and snippets.

View tomgco's full-sized avatar
☠️
Building stuff

Tom Gallacher tomgco

☠️
Building stuff
View GitHub Profile
unbind-key c
unbind-key '%'
unbind-key '"'
bind c neww -c '#{pane_current_path}'
bind '"' splitw -v -c '#{pane_current_path}'
bind '%' splitw -h -c '#{pane_current_path}'
@tomgco
tomgco / .tmux.conf
Created May 16, 2014 08:57
.tmux.conf
# status bar
set-option -g status-utf8 on
set -g status-interval 1
##set -g status-justify centre # center align window list
set -g status-left-length 20
set -g status-right-length 140
set -g status-right '#[fg=white,bg=black,dim] #(~/.bin/system-stats 1 5)#[fg=green,bg=black,bright] #[fg=red,dim]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white]%l:%M:%S %p'
# set-option -g default-command "reattach-to-user-namespace -l zsh"
var logger = require('logger')(module);
logger.info('Om nom nom');
// Same output
@tomgco
tomgco / keybase.md
Created January 8, 2015 10:24
keybase.md

Keybase proof

I hereby claim:

  • I am tomgco on github.
  • I am tomgco (https://keybase.io/tomgco) on keybase.
  • I have a public key whose fingerprint is 1607 71E6 8982 5AB5 FD21 4B63 3AAF D0DC D708 8C6F

To claim this, I am signing this object:

@tomgco
tomgco / .gitconfig
Created January 26, 2015 17:16
git lg
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@tomgco
tomgco / profile.viml
Created February 13, 2015 11:55
profile.viml
:profile start profile.log
:profile func *
:profile file *
" Profile your stuff
:profile pause
:qwall!
use std::io;
use std::io::prelude::*;
fn main() {
let mut grow: Vec<i64> = vec![0,0,0,0,0,0,0,0,0,0];
let stdin = io::stdin();
// let writer = io::stdout();
for line in stdin.lock().lines() {
@tomgco
tomgco / Dockerfile
Created August 28, 2015 15:09
Boot2docker - linux perf tools inside boot2docker
FROM boot2docker/boot2docker
ENV TCZ_DEPS_2 elfutils-dev \
elfutils
# Installing dependencies for compilation or linux perf tools
RUN apt-get update && apt-get install -y \
bison \
flex \
elfutils \
libelf-dev \
@tomgco
tomgco / README.md
Last active December 11, 2015 12:35
How to Flamegraph

How to flamegraph

node --perf_basic_prof index.js

This will create files based on the pid(s) like /tmp/perf-$pid which hold mapping of memory to function names. It will be automatically picked up by linux perf, so just run everything as your local user if you can.

@tomgco
tomgco / README.md
Last active July 20, 2016 13:20
Record GIFs in linux :]
  • Install ffcast
  • chmod +x recordgif
  • recordgif output.gif

gif from wed 20 jul 14 20 07 bst 2016