Skip to content

Instantly share code, notes, and snippets.

View roryokane's full-sized avatar

Rory O’Kane roryokane

View GitHub Profile
@roryokane
roryokane / Sass_snippets.sass
Created October 26, 2012 03:43
Sass snippets – useful mixins that Compass doesn't already define
@mixin all-but-first($property, $normal-value, $value-for-first: 0)
#{$property}: $normal-value
&:first-child
#{$property}: $value-for-first
@mixin all-but-last($property, $normal-value, $value-for-last: 0)
// won't work in IE8 or below; :last-child not supported
#{$property}: $normal-value
&:last-child
#{$property}: $value-for-last
@roryokane
roryokane / code.coffee
Created November 14, 2012 01:25
assistant for “Maximum of the difference” puzzle on Mathematics Stack Exchange, copied from JS Bin
# environment setup
# this is CoffeeScript (http://coffeescript.org/)
# and I'm using the Underscore.js library (http://underscorejs.org/)
log = console.log
testFunctionUsingTestCases = (fun, funName, testCases) ->
for testCase in testCases
expectedResult = _(testCase).first()
@roryokane
roryokane / README.md
Last active December 10, 2015 01:28
random and non-random dot distributions side by side
@roryokane
roryokane / .rbenv-version
Last active December 11, 2015 08:09
[Colossal Cue Adventure](http://adventure.cueup.com/) puzzle solvers
1.9.3-p327
@roryokane
roryokane / README.md
Last active December 11, 2015 09:08
MIT/GNU Scheme basic testing framework – test that function outputs given inputs are equal to expected values.

Here is a testing framework I wrote (for CS 360 class). You can use it to test if your Scheme functions give the correct output. Here’s an example of how you use it:

(load "test-framework.scm")
(load "foo.scm")


(test-with-cases foo
  (list
    '(( 1 1 ) 2)

'(( 10 5 ) 15)

var HomeURL = 'http://syntax.ubergibson.com/';
var SHJSLoaded = false;
var SHJSSyntaxLoaded = false;
var SyntaxHighlighted = false;
function shjsLoaded() {
SHJSLoaded = true;
if (SHJSSyntaxLoaded && !SyntaxHighlighted) {
SyntaxHighlighted = true;
sh_highlightDocument();
@roryokane
roryokane / template Sikuli script.sikuli
Created May 29, 2013 18:08
template Sikuli script (in Jython)
# app name: do thing
def mainAction():
main_region = None#TODO literal region
main_region.click(None)#TODO whatever actions
App.focus("")#TODO app name string e.g. "Sikuli IDE"
for i in range(1):
mainAction()
@roryokane
roryokane / Unicode symbols for copy-pasting.txt
Last active December 18, 2015 14:39
Unicode symbols (mostly punctuation) for copy-pasting
Unicode symbols for copy-pasting
(this file is UTF-8 encoded)
apostrophe
http://en.wikipedia.org/wiki/Apostrophe
quotation marks
http://en.wikipedia.org/wiki/Quotation_mark
@roryokane
roryokane / message.md
Last active December 20, 2015 20:19
“[rust-dev] New Rust runtime turned on. What next?” – formatted version of mailing list message
@roryokane
roryokane / FixCtrlBackspace.ahk
Created August 26, 2013 21:19
AutoHotkey script to fix Ctrl+Backspace (delete previous word) in File Explorer and Notepad
; how to write scripts: http://www.autohotkey.com/docs/
#IfWinActive ahk_class CabinetWClass ; File Explorer
^Backspace::
#IfWinActive ahk_class Notepad
^Backspace::
Send ^+{Left}{Backspace}
#IfWinActive
; source and context: http://superuser.com/a/636973/124606