Skip to content

Instantly share code, notes, and snippets.

fxn / gist:427dca61ec44adf8253b
Last active Jul 2, 2019
gzip assets with Capistrano
View gist:427dca61ec44adf8253b
# Compresses all .js and .css files under the assets path.
namespace :deploy do
# It is important that we execute this after :normalize_assets because
# ngx_http_gzip_static_module recommends that compressed and uncompressed
# variants have the same mtime. Note that gzip(1) sets the mtime of the
# compressed file after the original one automatically.
after :normalize_assets, :gzip_assets do
on release_roles(fetch(:assets_roles)) do
assets_path = release_path.join('public', fetch(:assets_prefix))
within assets_path do
brianhempel / bench_rails_memory_usage.rb
Last active Feb 3, 2022
A script to test the memory usage of your Rails application over time. It will run 30 requests against the specified action and report the final RSS. Choose the URL to hit on line 45 and then run with `ruby bench_rails_memory_usage.rb`.
View bench_rails_memory_usage.rb
require "net/http"
def start_server
# Remove the X to enable the parameters for tuning.
# These are the default values as of Ruby 2.2.0.
@child = spawn(<<-EOC.split.join(" "))
franks921 / Gemfile
Last active Jan 27, 2022
Postgres Arrays in Active Admin
View Gemfile
ruby '2.2.0'
source ''
gem 'font-awesome-rails'
gbuesing /
Last active Jun 29, 2022
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby


corbanb / JavaScript.sublime-build
Last active May 2, 2022
Sublime Text - Tools > Build System > New Build System
View JavaScript.sublime-build
// Sublime Text - Build System for Javascript
"cmd": ["node", "$file"],
"selector": "source.js"
willprice / .travis.yml
Last active Apr 18, 2022
How to set up TravisCI for projects that push back to github
View .travis.yml
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
- sudo apt-get install pandoc
- gem install asciidoctor
- make
- .travis/
adrianorsouza /
Last active Jun 15, 2022
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.


  • Sublime text 2 or 3 installed in your system within Applications folder


JamesMGreene /
Last active Aug 10, 2022
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.


gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

jodosha / Gemfile
Last active Dec 9, 2020
Full stack Lotus application example
View Gemfile
source ''
gem 'rake'
gem 'lotus-router'
gem 'lotus-controller'
gem 'lotus-view'
group :test do
gem 'rspec'
gem 'capybara'
denji /
Last active Aug 8, 2022
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)