Skip to content

Instantly share code, notes, and snippets.

View dsaronin's full-sized avatar

Daudi Amani dsaronin

  • Oakland, CA
View GitHub Profile
@dsaronin
dsaronin / ruby core dump
Created June 26, 2015 01:27
Cups gem 0.1.10 segmentation fault core dump
/home/daudi/projectspace/swalapala/app/models/cups_device.rb:101: [BUG] Segmentation fault at 0x0000000a491862
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0026 p:---- s:0103 e:000102 CFUNC :device_uri_for
c:0025 p:0015 s:0099 e:000098 METHOD /home/daudi/projectspace/swalapala/app/models/cups_device.rb:101
c:0024 p:0015 s:0095 e:000094 EVAL (irb):3 [FINISH]
c:0023 p:---- s:0093 e:000092 CFUNC :eval
c:0022 p:0024 s:0086 e:000085 METHOD /home/daudi/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/irb/workspace.rb:86
c:0021 p:0025 s:0079 e:000077 METHOD /home/daudi/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/irb/context.rb:379
@dsaronin
dsaronin / bundle-errors
Created February 8, 2014 21:27
Heroku bundle errors
Each time is showing up re a different gem:
Example 1:
================================================================================
-----> Deleting 2 files matching .slugignore patterns.
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from http://rubygems.org/.......
@dsaronin
dsaronin / gist:8155622
Last active March 22, 2017 07:09
token_authentication handling using milia & devise
## token_authentication
# at the head of of controllers which will need token authentication instead of password/session authentication:
skip_before_action :authenticate_tenant!
before_action :authenticate_by_token!
# then in application_controller.rb:
def authenticate_by_token!
@dsaronin
dsaronin / git_pi_connection_err
Created August 24, 2013 02:13
raspberrypi QEMU git connection error
git pull origin
The authenticity of host 'github.com (204.232.175.90)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
consulted github help page re this error: https://help.github.com/articles/error-permission-denied-publickey
@dsaronin
dsaronin / staging 2012-11-01
Created November 2, 2012 05:36
heroku platform error on staging-punda
$ git push staging newdev:master --force
Counting objects: 128, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (88/88), done.
Writing objects: 100% (88/88), 13.25 KiB, done.
Total 88 (delta 72), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
@dsaronin
dsaronin / gist:1991795
Created March 7, 2012 07:59
Adding RefineryCMS engines
$ vim Gemfile
$ bundle install
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.1.0)
Using activesupport (3.2.1)
Using builder (3.0.0)
Using activemodel (3.2.1)
Using erubis (2.7.0)
Using journey (1.0.3)
@dsaronin
dsaronin / gist:1823103
Created February 14, 2012 03:19
RefineryCMS edge engine generation
$ rails generate refinery:engine store name:string description:text keywords:string
create vendor/engines/stores/Gemfile
create vendor/engines/stores/Guardfile
create vendor/engines/stores/Rakefile
create vendor/engines/stores/app/controllers/refinery/stores/admin/stores_controller.rb
create vendor/engines/stores/app/controllers/refinery/stores/stores_controller.rb
create vendor/engines/stores/app/models/refinery/stores/store.rb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_actions.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_form.html.erb
create vendor/engines/stores/app/views/refinery/stores/admin/stores/_stores.html.erb
@dsaronin
dsaronin / gist:1813376
Created February 13, 2012 03:43
RefineryCMS edge project generation
~/projectspace$ rails new ref200 -m http://www.refinerycms.com/t/edge
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/images/rails.png
create app/assets/javascripts/application.js