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
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 / profile.viml
Created February 13, 2015 11:55
profile.viml
:profile start profile.log
:profile func *
:profile file *
" Profile your stuff
:profile pause
:qwall!
@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 / 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:

var logger = require('logger')(module);
logger.info('Om nom nom');
// Same output
@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"
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 / guidlines.md
Last active January 3, 2016 03:38
Git Commit Guidlines

COMMIT

Make sure git knows your name and email address:

$ git config --global user.name "J. Random User"
$ git config --global user.email "j.random.user@example.com"

Writing good commit logs is important. A commit log should describe what

@tomgco
tomgco / Clock Data.md
Last active December 29, 2015 11:39
BSON performance

BSONNative.BSON:

====================== 700 :: 0.07

BSONPure.BSON:

====================== 1991 :: 0.1991
@tomgco
tomgco / a.js
Created September 9, 2013 18:33
var v8 = require('strong-cpu-profiler')
, fs = require('fs')
v8.startProfiling('a')
console.log('a')
var profile = v8.stopProfiling('a')
fs.writeFileSync('a.nom', JSON.stringify({
title: profile.title,
uid: profile.uid,