Skip to content

Instantly share code, notes, and snippets.

Avatar

Man Vuong kidlab

  • Toptal (@toptal)
  • Ho Chi Minh City, Vietnam
View GitHub Profile
@kidlab
kidlab / README.md
Created Nov 6, 2016 — forked from joakimk/README.md
CircleCI elixir build example
View README.md

This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible.

We've been using this for months in multiple projects without any issues. Please ping be if there is any issues with this script and I'll update it.

It should be generic enough to work on any elixir app using mix.

If you have a elixir_buildpack.config, then enable that section in the build script to keep versions in sync!

2016-08-09: Updated to newer Erlang and Elixir and fixed curl command.

@kidlab
kidlab / another_example.rb
Last active Apr 18, 2017 — forked from shawndrost/application.rb
Single file Rails application
View another_example.rb
# Activate the gem you are reporting the issue against.
gem 'activerecord'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
@kidlab
kidlab / Debugging Ruby Notes.html
Created Dec 6, 2015 — forked from wallace/Debugging Ruby Notes.html
My notes from Aman Gupta's Debugging Ruby webinar by Engine Yard
View Debugging Ruby Notes.html
<a href="http://en.wikipedia.org/wiki/Lsof">lsof</a>
----
show open files
lsof -nPp <pid>
<a href="http://linux.die.net/man/1/strace">strace</a>
------
View goldiloader_issue_29.rb
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'activerecord', '4.2.4'
@kidlab
kidlab / gist:4c40fababb3944385f55
Last active Aug 29, 2015 — forked from masonforest/gist:4048732
Installing a Gem on Heroku from a Private GitHub Repo
View gist:4c40fababb3944385f55

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

  1. Get an OAuth Token from GitHub

First you will need to get an OAuth Token from GitHub using your own username and "note"