Skip to content

Instantly share code, notes, and snippets.

svoisen / onEnter.elm
Last active Jun 29, 2018
Handle onEnter in Elm including input value
View onEnter.elm
onEnter : (String -> msg) -> Attribute msg
onEnter tagger =
isEnter code =
if code == 13 then
Decode.succeed ""
else ""
decodeEnter =
Decode.andThen isEnter keyCode
svoisen / Of Mice and Men
Created Mar 21, 2013
Information on low-level scrolling events on Mac OS X
View Of Mice and Men
From the WebKit documentation at:
// Of Mice and Men
// ---------------
// There are three types of scroll data available on a scroll wheel CGEvent.
// Apple's documentation ([1]) is rather vague in their differences, and not
// terribly helpful in deciding which to use. This is what's really going on.
svoisen / 8-column gridset Sass
Created Feb 13, 2013
Sass for generating a Gridset style 1-4-8 column responsive grid
View 8-column gridset Sass
$font-size: 1em
$line-height: 1.5em
@mixin column($width, $offset)
margin-left: $offset
width: $width
float: left
padding: 0 $line-height/2 0 $line-height/2
-webkit-box-sizing: border-box
box-sizing: border-box
svoisen / gist:2400399
Created Apr 16, 2012
Juggernaut init.d script for RHEL
View gist:2400399
# chkconfig: 35 99 99
# description: Juggernaut
. /etc/rc.d/init.d/functions