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 / XboxControllerOnMac.m
Created August 27, 2011 21:37
Xbox Controller Methods in My ArduinoCopter Project.
- (void) RCTriggerRT:(DDHidJoystick *)joystick valueChanged:(NSNumber *)value {
// To use for Throttle;
}
- (void) RCRightJoystickX:(DDHidJoystick *)joystick valueChanged:(NSNumber *)value {
// Trim
}
- (void) RCRightJoystickY:(DDHidJoystick *)joystick valueChanged:(NSNumber *)value {
// Pitch
@tomgco
tomgco / smokeping-avg-loss
Created December 2, 2011 14:03
Get the average packet loss from a smokeping rrd.
rrdtool graphv "-" DEF:a="TomMacMini.rrd":loss:AVERAGE CDEF:ploss=a,100,*,20,/ PRINT:ploss:AVERAGE:"Average\:%.2lf %% avg" --end now --start end-1200

dis.io

What is dis.io

dis.io is a distributed computing platform that utilises idle CPU cycles from within a web browser or the command line, built purely on JavaScript and node.js.

The name dis.io descends from two origins. The first is that is was built as part of my Dissertation for my Degree in Computing BSc at Bournemouth University, however the other origin, which I personally think it is much better at describing the project is because it is a distributed computing platform.

Installation