Skip to content

Instantly share code, notes, and snippets.

View nuclearsandwich's full-sized avatar

Steven! Ragnarök nuclearsandwich

View GitHub Profile
@nuclearsandwich
nuclearsandwich / .bash_profile
Created November 14, 2012 11:16
My hackaround solution to everyone else failing at new things
# snipped
# Seriously Fuck Python 2
if [ -d ~/.fuckpy2 ]; then
# path-me! is equivalent to export PATH="$1":"$PATH"
path-me! "$HOME/.fuckpy2"
function python-is-py2 {
rm ~/.fuckpy2/python
ln -s /usr/bin/python2 ~/.fuckpy2/python
@nuclearsandwich
nuclearsandwich / destructuring_hash.rb
Created October 30, 2012 01:00
I was a little bit sad that this didn't work.
config[:token], config[:secret] = { :token => "tk", :secret => "sc" }

Mirah Questions

How do I do build class constants in Mirah? Will the compiler optimize them to values or do they stay methods

class TestConstants {
  public static string FOO = "foo";
}
@nuclearsandwich
nuclearsandwich / big_files.bash
Created September 28, 2012 23:27
Find large files in your git repos
#!/bin/bash
# big_files.bash
## Iterate over commit history and print big files and folders.
## usage: big_files.bash
# git-rev-list - print each revision in the HEAD reference
git rev-list --reverse HEAD \
| while read rev; do

The following has no hard line breaks:

Synth wolf quinoa, pinterest portland cliche mustache. Pork belly art party before they sold out pickled etsy artisan. Twee four loko food truck pickled. Post-ironic master cleanse pickled raw denim, freegan whatever cliche ethical 8-bit lo-fi. Twee selvage you probably haven't heard of them, williamsburg lo-fi brunch swag wayfarers. Godard quinoa vinyl, cliche pinterest vice terry richardson bushwick gastropub hoodie retro. Ennui chambray banh mi cardigan flexitarian.

The following paragraph has hard line breaks:

Synth wolf quinoa, pinterest portland cliche mustache. Pork belly art party before they sold out pickled etsy artisan. Twee four loko food truck pickled.

@nuclearsandwich
nuclearsandwich / gists.md
Created September 13, 2012 11:22
I fucking love gists.

Guise!

You guise!

Gists!

@nuclearsandwich
nuclearsandwich / sample.md
Created September 2, 2012 08:53
Lists in markdown and rendered markdown
  • This

    • list
    • has
      • no paragraphs
  • This

    • list
  • Has

$('span.mini-icon-delete-note').click()
// Delete some GitHub notifications using the Firebug console 10 at a time.
@nuclearsandwich
nuclearsandwich / rake_routes_output.txt
Created July 15, 2012 19:10
Ruby Sunday Homework
posts GET /posts(.:format) posts#index
POST /posts(.:format) posts#create
new_post GET /posts/new(.:format) posts#new
edit_post GET /posts/:id/edit(.:format) posts#edit
post GET /posts/:id(.:format) posts#show
PUT /posts/:id(.:format) posts#update
DELETE /posts/:id(.:format) posts#destroy
@nuclearsandwich
nuclearsandwich / gist:3096307
Created July 12, 2012 06:40
Things I had to do to play Shootmania
  • Enter my email address twice.
  • Download an 800MB file at a snailcrawl or install suspicious download manager. (Opted for snailcrawl)
  • wait 45 minutes for said download with a 20Mb/s pipe.
  • Enter my email address twice more.
  • Get a 65MB "maniaplanet update" I get that your company is maniaplanet but what do I need to update a client I literally JUST DOWNLOADED for?
  • Restart the client thing.
  • enter my email YET AGAIN. Honestly, what. the. balls.
  • log in with username/pass
  • Download a 200MB update.