Skip to content

Instantly share code, notes, and snippets.

View rbudiharso's full-sized avatar
🤔
hmmm.... I wonder what's this button here do...

Rahmat Budiharso rbudiharso

🤔
hmmm.... I wonder what's this button here do...
View GitHub Profile
@coreyhaines
coreyhaines / .rspec
Last active April 11, 2024 00:19
Active Record Spec Helper - Loading just active record
--colour
-I app
@smithcommajoseph
smithcommajoseph / constantize.js
Last active March 12, 2021 02:43
A JS implementation of Ruby's constantize
// A basic example of how Ruby's constantize _could_ work in JS
// See https://apidock.com/rails/String/constantize
function constantize (str) {
if (typeof str !== 'string') {
throw new TypeError('must pass in type of string');
}
if (str.match(/\W|\d/)) {
throw new SyntaxError('must pass in a valid Javascript name');
}
@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end