Skip to content

Instantly share code, notes, and snippets.

View mcauser's full-sized avatar

Mike Causer mcauser

View GitHub Profile
@mcauser
mcauser / Loot
Created March 2, 2015 22:54
Loot
1x Grove - 125KHz RFID Reader
2x Grove - 3-Axis Digital Accelerometer(±1.5g)
2x Grove - 3-Axis Digital Accelerometer(±16g)
1x Grove - 315MHz Simple RF Link Kit
1x Grove - 433MHz Simple RF Link Kit
2x Grove - Button
2x Grove - Buzzer
2x Grove - 4-Digit Display
1x Grove - Dry-Reed Relay
1x Grove - Electricity Sensor
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@mcauser
mcauser / gist:02442041c1b0987976b9
Created September 13, 2014 02:05
raspi - spidev_test.c
/*
* SPI testing utility (using spidev driver)
*
* Copyright (c) 2007 MontaVista Software, Inc.
* Copyright (c) 2007 Anton Vorontsov <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*
@mcauser
mcauser / .ssh config
Created January 20, 2014 02:30
.ssh config
ServerAliveInterval 60
ServerAliveCountMax 60
@mcauser
mcauser / npm global packages
Created December 11, 2013 03:28
npm global packages
# list installed
npm -g ls
# install
npm -g install bower
npm -g install express
npm -g install grunt-cli
npm -g install jshint
npm -g install jslint
npm -g install karma
@mcauser
mcauser / .gitconfig
Created December 10, 2013 15:50
.gitconfig
[user]
name = Mike Causer
email = [email protected]
[mergetool]
keepBackup = true
[credential]
helper = osxkeychain
[push]
default = simple
[core]
@mcauser
mcauser / Mikes.terminal
Created December 9, 2013 12:24
Mikes.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundBlur</key>
<real>0.0</real>
<key>BackgroundColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
@mcauser
mcauser / Imagemagick.md
Last active December 29, 2015 15:39
Imagemagick.md

Imagemagick snippets

Thumbnails

Fit within 150x150

-strip removes colour profiles and must be before -thumbnail.

-thumbnail is an optimised version of -resize and removes image profiles.

eg. 600x300 -> 150x75

@mcauser
mcauser / Sublime.md
Last active December 24, 2015 21:49
Sublime.md

Sublime Text 2 Config

Add subl cli support

ln -sf /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin
@mcauser
mcauser / .bash_profile
Last active December 24, 2015 08:59
.bash_profile
# remove all .DS_Store files in the current directory and its subdirectories
alias rmds='find . -name .DS_Store -type f -print -delete'
# show hidden files
alias showhiddenfiles='defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder'
# hide hidden files
alias hidehiddenfiles='defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder'
# apply changes by running