Skip to content

Instantly share code, notes, and snippets.

View justgage's full-sized avatar

Gage Peterson justgage

View GitHub Profile
Looks like you need a Bridge account. Let's create one now :)
Login [gpeterson]:
Password [secret]:
Email [gpeterson@instructure.com]:
Full Name [gpeterson]:
NOTICE: identifier "rails_runner
AccountManager.create(na...database: "bridge").use_tenant
Account.current.notification_profile.update(notifications: true)
u = NotifiableUser.create!(name: "gpeterson", uid: "gpeterson", email: "gpeterson@instructure.com", password: "secret", domain: Domain.root)
UserRoleService.new(u).add_roles(:support)
λ ~/get_smart/ features/ga* bin/setup
Spring stopped.
Checking dependencies...
./build.sh: line 3: /Users/gpeterson/.bash_profile: No such file or directory
Successfully installed statsd_test_harness-0.2.9
Parsing documentation for statsd_test_harness-0.2.9
Done installing documentation for statsd_test_harness after 0 seconds
1 gem installed
[npm_install] STARTING Thu Aug 27 10:12:39 MDT 2015
def index(conn, _params) do
user = Plug.Conn.get_session(conn, :current_user)
token = Plug.Conn.get_session(conn, :access_token)
vans = Repo.all(Van)
# how to get today :P
{date, _} = :calendar.local_time
date = Ecto.Date.from_erl date
render(conn, "index.html", user: user, vans: vans, token: token, date: date)
end
[debug] Processing by Vanpool.PageController.index/2
Parameters: %{"format" => "html"}
Pipelines: [:browser]
[debug] SELECT v0."id", v0."number", v0."capacity", v0."come_time", v0."go_time", v0."description", v0."inserted_at", v0."updated_at" FROM "vans" AS v0 [] OK query=0.6ms
[debug] SELECT r0."id", r0."dir", r0."userid", r0."vanid", r0."date", r0."keys", r0."inserted_at", r0."updated_at" FROM "riding" AS r0 WHERE (r0."userid" = $1) ["U051NJ6S6"] OK query=0.4ms
[info] Sent 500 in 23ms
[error] #PID<0.1837.0> running Vanpool.Endpoint terminated
Server: vanpool.dev:4000 (http)
Request: GET /
** (exit) an exception was raised:
@justgage
justgage / README.md
Last active August 29, 2015 14:23
Clojure solution to hackerrank anagram challenge
justgage@arch ~> opam install calendar (7)TODO: Figure out dates for preposal
=-=- Synchronising pinned packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[calendar.2.03.2] Synchronizing with /home/justgage/Dropbox/school-linux/now/cs499-senior-project
The following actions will be performed:
- install calendar.2.03.2*
=== 1 to install ===
=-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[calendar.2.03.2] Synchronizing with /home/justgage/Dropbox/school-linux/now/cs499-senior-project
@justgage
justgage / anagram.clj
Last active August 29, 2015 14:19
Anagram challenge in clojure
;; This is is a chalenge I did for hacker rank
;; enjoy,
;; ~ Gage
(defn first-half "gets the first half of a string"
[input]
(subs input 0 (/ (count input) 2)))
(defn second-half "gets the second half of the string"
[input]
@justgage
justgage / makeItJustChecked.js
Created November 19, 2014 03:10
A Bookmarklet to check all the boxes on I-learn.
javascript:(function(){var checkboxes=$("iframe").contents().find("iframe").contents().find(".radio");checkboxes.each(function(){this.checked=true});})();
@justgage
justgage / wallet4.java
Created May 7, 2014 06:23
An even more improved wallet!
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@justgage
justgage / wallet3.java
Created May 6, 2014 06:17
wallet3.java
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
class Transaction {