Skip to content

Instantly share code, notes, and snippets.

View erdostom's full-sized avatar

Tamas Erdos erdostom

View GitHub Profile
@erdostom
erdostom / gist:7916450
Created December 11, 2013 19:07
Alias for checking Coinbase BTC spot rate on *NIX systems. Copy and paste into ~/.bash_profile and restart terminal. Use with the command 'cbase'
#use in ~./bash_profile
alias cbase="curl -s https://coinbase.com/api/v1/prices/spot_rate | sed -n 's/.*amount"'":"\([0-9]*.[0-9]*\)".*$/Coinbase price: \1/pg'"'"
@erdostom
erdostom / gist:9520980
Created March 13, 2014 02:37
heroku line in application.rb
#put in config/application.rb
#Heroku needs this
config.assets.initialize_on_precompile = false
@erdostom
erdostom / Gemfile
Created April 1, 2014 21:55
jekyll gemfile for yeoman
source "http://rubygems.org"
gem 'jekyll', '~>1.4.2'
gem 'redcarpet'
gem 'sass', '3.2.10'
gem 'compass', '0.12.2'
@erdostom
erdostom / rm_ds_store.sh
Created May 28, 2014 16:49
Delete .DS_Store files recursively
find . "-name" ".DS_Store" -exec rm {} \;
@erdostom
erdostom / gist:7fe52b9f48df992f42e2
Created July 24, 2014 14:09
Update your .git repo information after renaming your profile / organization
find . -wholename '*.git/config' -type f -print0 | xargs -0 sed -i '' 's/git@github.com:BEFORE/git@github.com:AFTER/g'

They gave out dark glasses that you could watch it with. Dark glasses! Twenty miles away, you couldn't see a damn thing through dark glasses. So I figured the only thing that could really hurt your eyes (bright light can never hurt your eyes) is ultraviolet light. I got behind a truck windshield, because the ultraviolet can't go through glass, so that would be safe, and so I could see the damn thing.

Time comes, and this tremendous flash out there is so bright that I duck, and I see this purple splotch on the floor of the truck. I said, "That's not it. That's an after-image." So I look back up, and I see this white light changing into yellow and then into orange. Clouds form and disappear again-- from the compression and expansion of the shock wave.

Finally, a big ball of orange, the center that was so bright, becomes a ball of orange that starts to rise and billow a little bit and get a little black around the edges, and then you see it's a big ball of smoke with flashes on the inside, with the heat of

Keybase proof

I hereby claim:

  • I am erdostom on github.
  • I am erdostom (https://keybase.io/erdostom) on keybase.
  • I have a public key whose fingerprint is 41EE 8B48 D8C3 7189 7FAB 5418 5944 38F1 AA77 42EA

To claim this, I am signing this object:

@erdostom
erdostom / application.rb
Created October 26, 2015 18:48
Force IE away from compatibility mode
# config/application.rb
config.action_dispatch.default_headers.merge!('X-UA-Compatible' => 'IE=edge')
@erdostom
erdostom / raills_helper.rb
Created March 17, 2016 21:51
database cleaner for js: true
RSpec.configure do |config|
# If you're not using ActiveRecord, or you'd prefer not to run
# each of your examples within a transaction, remove the following
# line or assign false instead of true.
config.use_transactional_fixtures = false
# Clean up and initialize database before
# running test exmaples
config.before(:suite) do
# Truncate database to clean up garbage from
@erdostom
erdostom / consoleSave.js
Created February 7, 2017 16:08
save an object to json from chrome console
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'