Skip to content

Instantly share code, notes, and snippets.

Avatar

Terence Lee hone

View GitHub Profile
@hone
hone / readme.md
Last active Apr 4, 2019
Private GitHub repos with Bundler on Heroku
View readme.md

Setting Up Private GitHub Repos with Bundler on Heroku

To get a private GitHub repo to work on Heroku, you can leverage the netrc buildpack in conjunction with the Heroku Ruby buildpack.

When setting up the Gemfile, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.

gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
@hone
hone / helix_deployment.md
Last active Apr 20, 2017
Helix Deployment on Heroku
View helix_deployment.md

Helix Deployment on Heroku

You'll need a heroku app to deploy to if you don't have one already.

$ heroku create

With that, we can deploy. On Heroku, we'll need to setup the Rust toolchain and we can do that by using this Rust Buildpack. Then add the buildpack to the first position.

View disconnect.rb
#!/usr/bin/env ruby
## disconnect
# ./disconnect.rb -u yourusername
#
# This is a command-line utility for the bulk-downloading of run data from
# the connect.garmin.com web application, which has lackluster export
# capabilities.
#
View worker.rb
RUN_TIME = 100
RESCUE_TIME = 10
TERMFILE = "term.txt"
class Job
def self.perform(run_time, rescue_time)
sleep(run_time)
puts "Processed job!"
rescue SignalException => e
sleep rescue_time
@hone
hone / speaker.md
Created Jul 1, 2012 — forked from matiaskorhonen/speaker.md
Frozen Rails Talk Proposal Template (http://2012.frozenrails.eu/)
View speaker.md
@hone
hone / speaker.md
Created Jul 1, 2012 — forked from matiaskorhonen/speaker.md
Frozen Rails Talk Proposal Template (http://2012.frozenrails.eu/)
View speaker.md
View jruby
$ rake jruby:install[1.7.0.preview1,1.8]
curl http://jruby.org.s3.amazonaws.com/downloads/1.7.0.preview1/jruby-src-1.7.0.preview1.tar.gz -s -o - | tar vzxf -
curl https://s3.amazonaws.com/heroku-buildpack-ruby/jruby-launcher-1.0.12-java.tgz -s -o - | tar vzxf -
jruby
vulcan build -v -o jruby-1.7.0.preview1.tgz --source jruby-1.7.0.preview1 --command="apache-ant-1.8.4/bin/ant -Djruby.default.ruby.version=1.8 && rm bin/*.bat && rm bin/*.dll && rm bin/*.exe && ln -s jruby bin/ruby && mkdir -p /app/vendor/jruby-1.7.0.preview1 && mv bin /app/vendor/jruby-1.7.0.preview1 && mv lib /app/vendor/jruby-1.7.0.preview1"
Packaging local directory... done
Uploading source package... done
Building with: apache-ant-1.8.4/bin/ant -Djruby.default.ruby.version=1.8 && rm bin/*.bat && rm bin/*.dll && rm bin/*.exe && ln -s jruby bin/ruby && mkdir -p /app/vendor/jruby-1.7.0.preview1 && mv bin /app/vendor/jruby-1.7.0.preview1 && mv lib /app/vendor/jruby-1.7.0.preview1
Buildfile: /tmp/d20120611-2-1ut0zyc/input/build.xml
View gist:2802229
$ time curl -s -L http://bit.ly/L3PONC | sh
Downloading Tokaido.app
######################################################################## 100.0%
Setting up Tokaido.app
ruby 1.9.3p194 (2012-04-20) [x86_64-darwin11.4.0]
Rails 3.2.3
Done!
real 0m30.984s
user 0m0.574s
@hone
hone / Gemfile
Created May 7, 2012
Ruby Version Support
View Gemfile
source "https://rubygems.org"
ruby "1.9.3"
gem "rack"
@hone
hone / gist:2413351
Created Apr 18, 2012
Rails Girls Heroku Instruction
View gist:2413351

Get Heroku

Follow steps 1 through 3 of the quickstart guide to sign up, install the toolbelt, and login.

Deploying your app

Updating our database

First, we need to get our database to work on Heroku, which uses a different database. Please change the following in the Gemfile:

You can’t perform that action at this time.