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 / 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 / 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.

#!/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
$ 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 20:14
Ruby Version Support
source "https://rubygems.org"
ruby "1.9.3"
gem "rack"