Skip to content

Instantly share code, notes, and snippets.

View grahamb's full-sized avatar
🇨🇦
As Canadian as possible under the circumstances

Graham Ballantyne grahamb

🇨🇦
As Canadian as possible under the circumstances
View GitHub Profile
[
{ "keys": ["ctrl+s"], "command": "toggle_side_bar" },
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "Packages/User/Line terminator and newline.sublime-macro"} },
{ "keys": ["alt+enter"], "command": "run_macro_file", "args": {"file": "Packages/User/Comma and newline.sublime-macro"} }
]
@grahamb
grahamb / gist:3138256
Created July 18, 2012 19:23
Translink API presentaiton notes - July 18, 2012

API

  • REST, HTTP GET
  • default XML, can return JSON w/ conent-type:application/JSON header
  • API key required
  • versioned
  • 100 req/min per IP, max 10000 req/day -- open for discussion
  • services
    • stops
    • buses
  • stop estimates
@grahamb
grahamb / gist:3961696
Created October 26, 2012 21:33
I get spam.
Confused and frightened, Ada pulled him to his feet. He leaned heavily on her as she helped him into the tent and once there, utterly spent, he crumpled into a pile on his bed. He began to talk to her then, telling her for the first time how ill he was. It was scurvy, as far as he could tell, and it seemed to be getting worse. He had tried to keep it from the others, but Crawford knew, and Maurer a little, but now he could not hide it. His mood was gloomy, as he lay on his bunk, and he told Ada that for the first time he was scared. "I guess we shan't see Nome again," he said darkly. She told him to stay in bed and rest, and promised that she would finish chopping the wood. She was used to it, she said, and had done that kind of work. The last thing Knight wanted to do was lie helpless in the tent while Ada took care of him. But when he found himself too weak to lift his head, he consented. Ada went outside and took up the axe and began cutting the wood. Afterward, she collected snow for their drinking water
→ ~ traceroute farukat.es
traceroute to farukat.es (108.59.4.65), 64 hops max, 52 byte packets
1 10.0.1.1 (10.0.1.1) 0.860 ms 0.736 ms 0.579 ms
2 10.0.1.1 (10.0.1.1) 505.749 ms 239.580 ms 158.807 ms
3 64.59.157.209 (64.59.157.209) 86.446 ms 14.225 ms 40.030 ms
4 rc2bb-tge0-12-0-0.vc.shawcable.net (66.163.69.214) 16.354 ms 18.243 ms 15.656 ms
5 66.163.78.13 (66.163.78.13) 45.572 ms 30.164 ms 28.778 ms
6 rc1we-tge0-8-4-0.ed.shawcable.net (66.163.70.37) 40.690 ms 37.081 ms 36.187 ms
7 rc2sc-tge0-0-0-0.wp.shawcable.net (66.163.76.77) 104.991 ms 65.963 ms 52.522 ms
8 rc1as-pos0-0.vx.shawcable.net (66.163.77.50) 117.289 ms 112.477 ms 172.772 ms
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
PATH=/opt/ruby-enterprise-1.8.7-2012.02/bin:$PATH:$HOME/bin
GEM_HOME=/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8
#### bamboo tasks
# create "Deploy to Staging" task -- cap staging deploy
# create "Deploy to Production" task -- cap production deploy
#### server tasks
service httpd stop
/etc/init.d/canvas_init stop
role :app, "canvas.dev"
role :db, "canvas.dev", :primary => true
set :scm, :none
set :repository, "."
set :deploy_via, :copy
set :rails_env, "production"
ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "id_rsa")]
2013-02-25 17:04:53,902 ERROR [ajp-bio-7990-exec-37] grahamb 1024x162x1 1jn58qa 142.58.3.182 "POST /rest/applinks/1.0/applicationlinkForm/createAppLink HTTP/1.1" c.a.p.r.c.e.j.ThrowableExceptionMapper Uncaught exception thrown by REST service
java.lang.RuntimeException: java.security.spec.InvalidKeySpecException: java.lang.ClassCastException: org.bouncycastle.asn1.DERInteger cannot be cast to org.bouncycastle.asn1.ASN1Sequence
at com.atlassian.security.auth.trustedapps.ListApplicationRetriever.getApplicationProtocolV0(ListApplicationRetriever.java:93) ~[atlassian-trusted-apps-core-2.5.2.jar:na]
at com.atlassian.security.auth.trustedapps.ListApplicationRetriever.getApplicationProtocolV1(ListApplicationRetriever.java:52) ~[atlassian-trusted-apps-core-2.5.2.jar:na]
at com.atlassian.security.auth.trustedapps.ListApplicationRetriever.getApplication(ListApplicationRetriever.java:46) ~[atlassian-trusted-apps-core-2.5.2.jar:na]
at com.atlassian.security.auth.trustedapps.ReaderApplicationRetriever.getA
@grahamb
grahamb / vm.rb
Last active December 15, 2015 06:29
vm.rb
role :app, "icat-graham-canvas.its.sfu.ca"
role :db, "icat-graham-canvas.its.sfu.ca", :primary => true
set :scm, :none
set :repository, "."
set :deploy_via, :copy
set :rails_env, "production"
ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "id_rsa")]
while(1);[{"course":{"abstract_course_id":null,"grading_standard_id":null,"locale":null,"name":"STAT .............