Skip to content

Instantly share code, notes, and snippets.

View bshepherdson's full-sized avatar

Braden Shepherdson bshepherdson

  • Metabase
  • Godfrey, ON, Canada
View GitHub Profile
import XMonad
import XMonad.Layout.IM
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Reflect
import XMonad.Config.Gnome
main = xmonad gnomeConfig {
layoutHook = onWorkspace "gimp" gimp $ layoutHook gnomeConfig
,modMask = mod4Mask
,workspaces = ["1","2","3","4","5","6","7","8","9","gimp"]
Config { fgColor = "white"
, bgColor = "black"
, position = Bottom
, font = "xft:Terminus:size=10"
, commands = [ Run StdinReader ]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{"
}
@bshepherdson
bshepherdson / gist:1160759
Created August 21, 2011 15:39
Broken jqueryDayTimeField in Yesod
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-}
module Handler.Activities where
import LoveBug
import Utils
import Data.Text (Text)
import qualified Data.Text as T
import Control.Applicative
import Control.Monad
@bshepherdson
bshepherdson / gist:2287741
Created April 2, 2012 22:44
Error trying to build Mirah
braden@twilights-library> jruby -S rake compile ~/src/mirah
mkdir -p dist
mkdir -p build
Compiling Ruby sources
Compiling Mirah sources
Parsing...
org/mirah/class_loader.mirah
org/mirah/isolated_resource_loader.mirah
org/mirah/ant/compile.mirah
duby/lang/compiler/interfaces.duby
@bshepherdson
bshepherdson / gist:2301301
Created April 4, 2012 14:01
Mirah build error
> jruby -S rake jar ~/src/mirah
mkdir -p dist
mkdir -p build
Compiling Ruby sources
Compiling Mirah sources
Parsing...
org/mirah/class_loader.mirah
org/mirah/isolated_resource_loader.mirah
org/mirah/ant/compile.mirah
duby/lang/compiler/interfaces.duby
@bshepherdson
bshepherdson / nonograms.hs
Created June 9, 2012 00:34
Haskell solver for nonograms
import Control.Monad
import Data.List
data Square = Blank | Box | X
deriving (Eq)
type Clue = [Int]
-- returns all fits for a given clue in a row of the given length, regardless of matching its current state.
@bshepherdson
bshepherdson / gist:4649838
Created January 27, 2013 19:09
My Mac cabal config
-- This is the configuration file for the 'cabal' command line tool.
-- The available configuration options are listed below.
-- Some of them have default values listed.
-- Lines (like this one) beginning with '--' are comments.
-- Be careful with spaces and indentation because they are
-- used to indicate layout for nested sections.
-- This configuration follows the layout of Haskell Platform on Mac OS X,
@bshepherdson
bshepherdson / gist:5700402
Last active December 18, 2015 00:59
Incantation to install and properly link git version of cordova-plugman and cordova-cli.
git clone https://git-wip-us.apache.org/repos/asf/cordova-plugman.git
cd cordova-plugman
npm install
sudo npm link
cd ..
git clone https://git-wip-us.apache.org/repos/asf/cordova-cli.git
cd cordova-cli
git checkout master2
npm install
sudo npm link
@bshepherdson
bshepherdson / invites.coffee
Created July 11, 2013 16:34
Failing ngScenario test
describe 'invites', ->
it 'should allow sending an invite', ->
browser().navigateTo('/app/index-e2e.html#/profile')
input('send.invite_email', 'invite box').enter('invited@email.com')
element('#invitebutton', 'send invite button').click()
expect(binding('message')).toEqual('Invite sent to invited@email.com')
expect(element('#message', 'success message window').text()).toEqual('Invite sent to invited@email.com')
expect(element('#invitebox', 'invite box').val()).toEqual('')
@bshepherdson
bshepherdson / spinner.coffee
Created July 11, 2013 17:38
Angular spinner directive
timetogetherApp.directive 'ttSpinner', ->
scope: { waitFor: '=ttSpinner' }
restrict: 'A'
template: '''
<div ng-show="!waitFor" class="spinner">
<img src="/app/images/spinner.gif" />
</div>
<div ng-show="waitFor" ng-transclude></div>
'''
transclude: true