As configured in my dotfiles.
start new:
tmux
start new with session name:
| grammar org.json.Json with org.eclipse.xtext.common.Terminals | |
| generate json "http://www.json.org/" | |
| Object: | |
| '{' ((members+=Member) (',' members+=Member)*)? '}'; | |
| Member: | |
| key=STRING ':' value=Value; | |
| refname="$1" | |
| oldrev="$2" | |
| newrev="$3" | |
| # Find out revision of master | |
| masterref=`git show-ref --hash --heads master` | |
| # Find out common merge base of master and the checked in revision. | |
| mergebase=`git merge-base $masterref $newrev` | |
| if [[ $mergebase != $masterref && ( $refname == *development* || $refname == *feature* ) ]] | |
| then | |
| echo "Cannot push changes. Merge base is $mergebase, master is $masterref. Please type 'git pull origin master' and merge any conflicts first before$ |
| package com.mojolly.backchat | |
| package redis | |
| package resque | |
| import com.mojolly.backchat.redis.resque.Resque.{ResqueWorkerActor} | |
| import net.liftweb.json._ | |
| import JsonAST._ | |
| import JsonDSL._ | |
| import java.net.InetAddress | |
| import com.redis.ds.{ RedisDeque, RedisDequeClient } |
| // Usage: | |
| // p(instance)('privateMethod)(arg1, arg2, arg3) | |
| class PrivateMethodCaller(x: AnyRef, methodName: String) { | |
| def apply(_args: Any*): Any = { | |
| val args = _args.map(_.asInstanceOf[AnyRef]) | |
| def _parents: Stream[Class[_]] = Stream(x.getClass) #::: _parents.map(_.getSuperclass) | |
| val parents = _parents.takeWhile(_ != null).toList | |
| val methods = parents.flatMap(_.getDeclaredMethods) | |
| val method = methods.find(_.getName == methodName).getOrElse(throw new IllegalArgumentException("Method " + methodName + " not found")) |
| includeTargets << grailsScript("_GrailsInit") | |
| display = ':65' | |
| resolution = '-screen 1024x768' | |
| target('default': "Run tests with xephyr") { | |
| List parsedArgs = args.split() as List | |
| exec (executable: 'Xephyr', spawn: true) { |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| Hello scala, my old friend | |
| I've come to take you home again | |
| Because a feature slowly creeping | |
| left me plagued with doubts and weeping | |
| and the version that was tagged in the repo | |
| just has to go | |
| it lacks the signs of soundness | |
| On sleepless nights I hacked alone | |
| applying ant and other tools of stone |
| ################################################################################# | |
| # start and stop the vpn from the command line from now on with these two commands | |
| ################################################################################# | |
| startvpn() { | |
| sudo launchctl load -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist | |
| launchctl load -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist | |
| } | |
| quitvpn() { | |
| launchctl unload -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist | |
| sudo launchctl unload -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist |
| /** | |
| * R functions to create and manipulate Breeze matrices. This should go into | |
| * Breeze or a sub-project of Breeze eventually. | |
| */ | |
| object RFunc { | |
| import breeze.linalg._ | |
| import breeze.stats.distributions._ | |
| import breeze.stats.DescriptiveStats._ | |
| /** |
As compiled by Kevin Wright a.k.a @thecoda
(executive producer of the movie, and I didn't even know it... clever huh?)
please, please, please - If you know of any slides/code/whatever not on here, then ping me on twitter or comment this Gist!
This gist will be updated as and when I find new information. So it's probably best not to fork it, or you'll miss the updates!
Monday June 16th