Skip to content

Instantly share code, notes, and snippets.

View hone's full-sized avatar

Terence Lee hone

View GitHub Profile
@hone
hone / Dockerfile
Created June 25, 2024 16:10
runwasi build environment in Amazon Linux 2023
FROM amazonlinux:2023
RUN dnf install git make automake gcc protobuf-compiler libseccomp-devel clang-devel libzstd-devel -y
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.profile
ENV ENV="/root/.profile"
@hone
hone / helix_deployment.md
Last active April 20, 2017 00:50
Helix Deployment on Heroku

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 October 26, 2021 12:11
Private GitHub repos with Bundler on Heroku

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 August 29, 2015 14:06
A Call For Help: Testing Changes to Ruby 2.1.x's GC

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?

@hone
hone / speaker.md
Last active August 29, 2015 13:57 — forked from matiaskorhonen/speaker.md
#!/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.
#
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 July 1, 2012 20:38 — forked from matiaskorhonen/speaker.md
Frozen Rails Talk Proposal Template (http://2012.frozenrails.eu/)
@hone
hone / speaker.md
Created July 1, 2012 19:21 — forked from matiaskorhonen/speaker.md
Frozen Rails Talk Proposal Template (http://2012.frozenrails.eu/)
$ 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