Skip to content

Instantly share code, notes, and snippets.

View jamesmacfie's full-sized avatar

James Macfie jamesmacfie

  • Featherston, New Zealand
View GitHub Profile
@jamesmacfie
jamesmacfie / demo.ino
Last active August 29, 2015 14:09
A small snippet of code that turns on and off three solenoid valves via an Arduino. The test code turns on three valves for two seconds each.
/*
* Test app that turns three solenoid valves on at set intervals and duration over a
* set time period
*/
// The time to test the current time against
long startTime = 0;
// Poorly named variable - the time before the timer resets itself back to '0'
long dayLength = 6000;
@jamesmacfie
jamesmacfie / waltquote
Created October 7, 2014 02:52
Inappropriate quotes and stuff
# Description:
# Spits out quotes
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@jamesmacfie
jamesmacfie / decision.coffee
Created September 26, 2014 02:17
Simple hubot decision maker
# Description:
# Decides between two given options
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@jamesmacfie
jamesmacfie / init.coffee
Created August 21, 2014 23:28
A small bit of code that adds the ability to close all open tabs in your Atom editor. Put this in your init.coffee file (then reload Atom) and then 'Close All Tabs' will be an available option in the Command Palette
atom.workspaceView.command 'pane:close-all-tabs', ->
panes = atom.workspace.getPanes()
for pane in panes
pane.destroy()
@jamesmacfie
jamesmacfie / .editorconfig
Created June 7, 2014 02:34
The .editorconfig I use with my projects
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
indent_style = tab
indent_size = 2
trim_trailing_whitespace = true