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
### Keybase proof | |
I hereby claim: | |
* I am benwoody on github. | |
* I am benwoodall (https://keybase.io/benwoodall) on keybase. | |
* I have a public key ASB-iJ_894UEcFlEx14XDff-wEU1ByfkX2swjBLa10ajRAo | |
To claim this, I am signing this object: |
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
... | |
type MyStruct struct { | |
MyName string `json:"name"` | |
} | |
func (c RenderCorrectJson) Work() revel.Result { | |
json := MyStruct{MyName: "Ben Woodall"} | |
return c.RenderJson(json) | |
} |
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
javascript:window.location.href=window.location.href.replace("https://","ioc://"); |
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
[alias] | |
st = status | |
co = commit | |
br = branch | |
ch = checkout | |
df = diff | |
dc = diff --cached | |
lg = log -p | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all |
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
Show hidden characters
[ | |
{ | |
"keys": ["super+alt+left"], | |
"command": "set_layout", | |
"args": | |
{ | |
"cols": [0.0, 0.33, 1.0], | |
"rows": [0.0, 1.0], | |
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]] | |
} |
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
server = require('http').createServer (request, response) -> | |
response.writeHead 200, ('ContentType': 'text/plain') | |
response.end "Hello World" | |
server.listen 8124 | |
console.log 'Server running at http://0.0.0.0:8124' |
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
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` | |
parse_git_branch () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
git_status="$(git status 2> /dev/null)" | |
branch_pattern="^# On branch ([^${IFS}]*)" |
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
require 'autotest' | |
module Autotest::Notify | |
def self.notify title, msg, img, pri='low', time=3000 | |
`notify-send #{title} -i #{img} -u #{pri} -t #{time} '#{msg}'` | |
end | |
Autotest.add_hook :ran_command do |autotest| | |
results = [autotest.results].flatten.join("\n") | |
output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+pending)?/) |
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
module Autotest::Growl | |
def self.growl title, msg, img, pri=0, stick="" | |
system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{stick}" | |
end | |
Autotest.add_hook :ran_command do |at| | |
results = [at.results].flatten.join("\n") | |
output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+pending)?/) | |
if output =~ /[1-9]\sfailures?/ | |
growl "Test Results", "#{output}", '~/Dropbox/Photos/autotest/rails_fail.png', 2 #, "-s" |
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
require 'json' | |
json = JSON.parse(YOURFILE) | |
a = [] | |
json['entries'].each { |v| a <<v } |
NewerOlder