Skip to content

Instantly share code, notes, and snippets.

Daniel Kehoe DanielKehoe

Block or report user

Report or block DanielKehoe

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
@DanielKehoe
DanielKehoe / gist:21f40ea1bd1b2d2eeb7a809b83ba2909
Created Feb 11, 2018
Ruby 2.5.0 warnings with Rake and RVM
View gist:21f40ea1bd1b2d2eeb7a809b83ba2909
$ rake -v
/Users/danielkehoe/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_utils.rb:10: warning: already initialized constant FileUtils::RUBY
/Users/danielkehoe/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_utils.rb:10: warning: previous definition of RUBY was here
/Users/danielkehoe/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_utils.rb:109: warning: already initialized constant FileUtils::LN_SUPPORTED
/Users/danielkehoe/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_utils.rb:109: warning: previous definition of LN_SUPPORTED was here
/Users/danielkehoe/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/lib/rake/file_utils_ext.rb:17: warning: already initialized constant Rake::FileUtilsExt::DEFAULT
/Users/danielkehoe/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/rake-12.3.0/lib/rake/file_utils_ext.rb:17: warning: previous definition of DEFAULT was here
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING:
View gist:7170f244fd5f6768b3a5
### Keybase proof
I hereby claim:
* I am DanielKehoe on github.
* I am danielkehoe (https://keybase.io/danielkehoe) on keybase.
* I have a public key whose fingerprint is 9E0B 6049 0845 9F50 AA77 EB9E 5118 3231 EA7B 9F23
To claim this, I am signing this object:
@DanielKehoe
DanielKehoe / learning-rails.md
Last active Dec 15, 2015
"Learning Rails" beginner syllabus
View learning-rails.md
  • Introduction
  • Concepts How Rails Works Six Perspectives On a Rails Application Rails Stack
  • Product Planning user stories BDD Cucumber features *** collaboration
@DanielKehoe
DanielKehoe / gist:5052721
Created Feb 27, 2013
output of 'rvm get head'
View gist:5052721
set aliases from ~/.oh-my-zsh/lib/aliases.zsh
added to PATH and ENV from ~/.zshrc
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
$ rvm get head
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 291 0 --:--:-- --:--:-- --:--:-- 1250
100 11525 100 11525 0 0 8551 0 0:00:01 0:00:01 --:--:-- 42843
Downloading RVM from wayneeseguin branch master
@DanielKehoe
DanielKehoe / gist:5052678
Created Feb 27, 2013
RVM tells me to use the login shell but I already am
View gist:5052678
set aliases from ~/.oh-my-zsh/lib/aliases.zsh
added to PATH and ENV from ~/.zshrc
$ echo $SHELL
/bin/zsh --login
$ if [[ -o login ]]; then; print yes; else; print no; fi
yes
$ rvm -v
rvm 1.18.14 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
@DanielKehoe
DanielKehoe / gist:5051658
Last active Dec 14, 2015
problems installing Ruby 2.0 using rvm
View gist:5051658
Last login: Wed Feb 27 12:52:37 on ttys000
/etc/zprofile:source:2: no such file or directory: /etc/profile.d/rvm.sh
/Users/danielkehoe/.zprofile:source:2: no such file or directory: /usr/local/rvm/scripts/rvm
set aliases from ~/.oh-my-zsh/lib/aliases.zsh
added to PATH and ENV from ~/.zshrc
railsapps rvm -v
rvm 1.18.14 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ rvm get head --autolibs=3
@DanielKehoe
DanielKehoe / tutorials.railsapps.org.js
Created Jan 11, 2013
JavaScript used to track events on the https://tutorials.railsapps.org site and funnel to segment.io.
View tutorials.railsapps.org.js
// https://segment.io/railsapps/snippet/
var analytics=analytics||[];analytics.load=function(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"===document.location.protocol?"https://":"http://")+"d2dq2ahtl5zl1z.cloudfront.net/analytics.js/v1/"+e+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);var r=function(e){return function(){analytics.push([e].concat(Array.prototype.slice.call(arguments,0)))}},i=["identify","track","pageview","ab"];for(var s=0;s<i.length;s++)analytics[i[s]]=r(i[s])},
analytics.load("xxxxxxxxxx");
// run analytics on every page
$(document).ready(function() {
var user_id = $('#body').data('user_id')
var user_name = $('#body').data('user_name')
var user_plan = $('#body').data('user_plan')
// https://segment.io/railsapps/setup
analytics.identify(user_id, {
@DanielKehoe
DanielKehoe / gist:3695312
Created Sep 11, 2012
check rvm gem version in app template
View gist:3695312
say_wizard "switching to gemset '#{app_name}'"
unless Gem.loaded_specs['rvm'].nil?
if Gem.loaded_specs['rvm'].version > Gem::Version.create('1.11.3.4')
raise "Please update rvm gem to 1.11.3.5 or newer"
end
end
begin
RVM.gemset_use! app_name
rescue StandardError => e
raise "rvm failure: unable to use gemset #{app_name}, reason: #{e}"
@DanielKehoe
DanielKehoe / gist:3692587
Created Sep 10, 2012
Issues creating a project-specific rvm gemset
View gist:3692587
My rails_apps_composer gem creates an application template from
various "recipes" (similar to Michael Bleigh’s RailsWizard gem):
https://github.com/RailsApps/rails_apps_composer
I've got a recipe that creates a project-specific rvm gemset.
Quite a few users use the recipe without problems but several
have reported errors. I'm not able to identify the source of the errors.
I'd like to get some help. First, to review my code and identify
@DanielKehoe
DanielKehoe / application.css
Created Mar 5, 2012 — forked from lucapette/application.css
twitter bootstrap rails 3.1 notes
View application.css
/*
*= require_self
*/
html, body {
background-color: #eee;
}
body {
padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */
}
You can’t perform that action at this time.