Skip to content

Instantly share code, notes, and snippets.

View mattreduce's full-sized avatar
🏎️

Matthew Conway mattreduce

🏎️
View GitHub Profile
digraph G {
compound=true;
splines=false;
node [shape=diamond, regular=true, fixedsize=true];
edge [color=red];
subgraph cluster_0 {
label = "Thread 1\nAdversary 1";
{rank=same; 1 -> 2 [label=A]};

Keybase proof

I hereby claim:

  • I am mattreduce on github.
  • I am mattreduce (https://keybase.io/mattreduce) on keybase.
  • I have a public key whose fingerprint is EA6E 4086 3F06 489E 802A 8967 8A9A 9BA2 D868 8169

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am mattonrails on github.
  • I am mattreduce (https://keybase.io/mattreduce) on keybase.
  • I have a public key whose fingerprint is EA6E 4086 3F06 489E 802A 8967 8A9A 9BA2 D868 8169

To claim this, I am signing this object:

@mattreduce
mattreduce / logs
Created May 14, 2013 00:47
Dynamo app failed to start
2013-05-14T00:43:35.198206+00:00 heroku[slugc]: Slug compilation finished
2013-05-14T00:43:37.805227+00:00 heroku[web.1]: Starting process with command `MIX_ENV=prod mix server -p 42678`
2013-05-14T00:43:39.100815+00:00 app[web.1]: Mix requires the compile path "ebin" to be inside a directory with the same name as the application name :dynamo_heroku_demo, got "/app/ebin"
2013-05-14T00:43:39.145745+00:00 app[web.1]: =INFO REPORT==== 14-May-2013::00:43:39 ===
2013-05-14T00:43:39.145745+00:00 app[web.1]: application: dynamo_heroku_demo
2013-05-14T00:43:39.145745+00:00 app[web.1]: exited: {bad_return,
2013-05-14T00:43:39.145745+00:00 app[web.1]:
2013-05-14T00:43:39.145745+00:00 app[web.1]: {'EXIT',
2013-05-14T00:43:39.145745+00:00 app[web.1]: {{'Elixir-DynamoHerokuDemo',start,[normal,[]]},
2013-05-14T00:43:39.146064+00:00 app[web.1]: "/tmp/build_3ijls8nj7opfc/ex/lib/elixir/lib/enum.ex"},
@mattreduce
mattreduce / migrate-shared-db.sh
Created August 9, 2012 19:03
Migrating Heroku Shared DB
heroku maintenance:on
heroku addons:add pgbackups
heroku pgbackups:capture <YOUR_DATABASE_URL>
heroku addons:remove shared-database
heroku addons:add heroku-postgresql:dev
heroku pgbackups:restore <DATABASE> <BACKUP_ID>
heroku pg:promote <DATABSE>
heroku maintenance:off
" http://vimgolf.com/challenges/4d1a34ccfa85f32065000004
noremap E VyjVp
" http://vimgolf.com/challenges/4d1a4d82a860b7447200008d
noremap <silent> <leader>v mv:%s/\s\+$//e<CR>:%s/\t/ /e<CR>`v
" this one was already in my .vimrc
@mattreduce
mattreduce / remove_whitespace
Created November 22, 2010 19:59
Place this in your vimrc to remove trailing whitespace on write
" kill trailing spaces when exiting file
autocmd BufWritePre * :%s/\s\+$//e
class CaesarCipher
@@alphabet = ("A".."Z").to_a
def initialize(input, shift_num)
@input, @shift_num = input.upcase, shift_num
end
def encrypt
shift_things_around
require 'csv'
File.open("output.html", 'w') do |output_file|
CSV.readlines("source.csv").each do |text, link|
output_file.puts "<a href='#{link}'>#{text}</a> \n"
end
end