Skip to content

Instantly share code, notes, and snippets.

alexander rakoczy toothrot

Block or report user

Report or block toothrot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 01-migrate-db.config
container_commands:
sync_db:
command: "docker run --env DATABASE_URL=`/opt/elasticbeanstalk/bin/get-config environment | jq -r .DATABASE_URL` aws_beanstalk/current-app:latest lein lobos migrate"
leader_only: true
@toothrot
toothrot / git-cleanup.sh
Last active Jan 27, 2016
Clean up branches that have been merged into master
View git-cleanup.sh
#!/bin/sh
set -e
if test -d .git
then
git fetch
git checkout master
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d
git remote prune origin
git checkout -
fi
View character_frequency.rb
characters = ["astro.png",
"banyan.png",
"bear.png",
"bird.png",
"chillanna.png",
"cupcake.png",
"dino.png",
"frog.png",
"gorilla.png",
"monkey.png",
@toothrot
toothrot / gist:36eb1451e2e9589f7f8b
Created Mar 18, 2015
Exercise: Fibonacci Closure
View gist:36eb1451e2e9589f7f8b
//https://tour.golang.org/moretypes/22
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
a := 0
b := 1
View gist:2e18e378c12fbb1f9db2
// https://tour.golang.org/moretypes/19
package main
import (
"golang.org/x/tour/wc"
)
import "strings"
func WordCount(s string) map[string]int {
counts := make(map[string]int)
View gist:459b3cea4b53abd99e18
// https://tour.golang.org/moretypes/14
package main
import "golang.org/x/tour/pic"
func Pic(dx, dy int) [][]uint8 {
mything := make([][]uint8, dy)
for i := 0; i < dy; i++ {
mything[i] = make([]uint8, dx)
}
View gist:508eddd875f5ebf2b664
abc = "abc" "#{abc}"
#=> "abc"
abc = "abc" "#{abc}"
#=> "abcabc"
String.send(:define_method, :call) { |*a| self.concat(*a) }
"abc" "abc". ("abc"). ("abc")
#=> "abcabcabcabc"
View gist:e597832dd95c81a5ecdd
commit 048f2266fa4941257cc5650831fc477bff4d2a94
Author: Alexander Rakoczy <alex@kitchensurfing.com>
Date: Mon Jan 5 13:45:40 2015 -0500
See you in 5 years
diff --git a/spec/mailers/request_mailer_spec.rb b/spec/mailers/request_mailer_spec.rb
index 8a9bfd2..f8fbaad 100644
--- a/spec/mailers/request_mailer_spec.rb
+++ b/spec/mailers/request_mailer_spec.rb
View keybase.md

Keybase proof

I hereby claim:

  • I am toothrot on github.
  • I am rock (https://keybase.io/rock) on keybase.
  • I have a public key whose fingerprint is 16C2 32CC 45AD D901 6D00 55F3 401E A3D6 A3DC E5FA

To claim this, I am signing this object:

@toothrot
toothrot / corn
Created Apr 1, 2013
Best part of the morning
View corn
$ corn
.-'"`/\
// /' /\`\
('//.-'/`-.;
\ \ / /-.
__.__.___..__._.___.\\ \\----,_
.:{@&#,&#@&,@&#&&,#&@#&@&\\` \-. .-'-.
.:{@#@,#@&#,@#&&#,@&#&@&,&@#&&\\, -._,"- \
.{#@#&@#@#&#&@&#@#@&#,@#@#&@&&#@#\ \// = \`=\__
`{#@,@#&@&,@&#@,#@&#@#&@#&@,&#@,#/\/ =`-. -_=__
You can’t perform that action at this time.