Skip to content

Instantly share code, notes, and snippets.

View justgage's full-sized avatar

Gage Peterson justgage

View GitHub Profile
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 / README.md
Last active August 29, 2015 14:23
Clojure solution to hackerrank anagram challenge
[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:
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
λ ~/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
Looks like you need a Bridge account. Let's create one now :)
Login [gpeterson]:
Password [secret]:
Email [[email protected]]:
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: "[email protected]", password: "secret", domain: Domain.root)
UserRoleService.new(u).add_roles(:support)
@justgage
justgage / rock_paper_sinners.rs
Created October 29, 2015 23:38
An implementation of rock, paper, scissors that mostly cheats. (part 1)
use std::io;
use std::io::Write;
fn prompt() -> String {
let input = io::stdin();
println!("Welcome to Rock, Paper, and Sinners!");
package main.scala
object HelloWorld {
def hello(name: String = "World") = "Hello, " + name;
// sudo tests
def main(args: Array[String]):Unit = {
println(hello())
println(hello("Gage"))
}
...
type: 7
player
Score: 0
numLives: 3
about to reset state
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffef95f700 (LWP 26178)]
0x0000000000403aad in std::__cxx11::list<GameObject*, std::allocator<GameObject*> >::begin (this=0x0)
@justgage
justgage / gage-lab00.cpp
Created April 20, 2016 01:54
A program to prove that I can C++
/***********************************************************************
* Program:
* Lab 00, Practice Lab Submission
* Brother Jones, CS345
* Author:
* Gage Peterson
* Summary:
* This is the first lab. It will count the number of lines the user
* enters that begin a capital letter
************************************************************************/