A web-page, more-readable version of the code by praptak on https://news.ycombinator.com/item?id=4956101.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.9.3-p327 |
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
“ |
Brian Anderson banderson at mozilla.com
Thu Aug 8 11:54:26 PDT 2013
from https://mail.mozilla.org/pipermail/rust-dev/2013-August/005158.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |