Skip to content

Instantly share code, notes, and snippets.

Avatar

Terence Lee hone

View GitHub Profile
@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.

@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 / gist:a7864a7012dd23a42787
Last active Aug 29, 2015
A Call For Help: Testing Changes to Ruby 2.1.x's GC
View gist:a7864a7012dd23a42787

A Call For Help: Testing Changes to Ruby 2.1.x's GC

Backstory

There's been some known memory issues when upgrading from Ruby 2.0.0 to Ruby 2.1. Ruby 2.1 introduced a new garbage collector (GC), RGenGC, to improve performance. It traded more memory use for speed. The new GC does less aggressive memory clearing. Doing less work means it's faster.

This sounds great, but on lower memory instances it became an issue since there is less memory available to trade. This patch had been applied to Ruby 2.1 and the hopes are it will solve this [issue](https://bugs.ruby-lang.org/issues/ 9607#note-11). By introducing more frequent GC runs, it will reduce the amount of memory being used.

Great, How Can I Help?

View speaker.md
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
You can’t perform that action at this time.