I hereby claim:
- I am tombruijn on github.
- I am tombruijn (https://keybase.io/tombruijn) on keybase.
- I have a public key whose fingerprint is D81B 2BFB CD75 EB0A A348 A240 86CF A78E B98D 8B50
To claim this, I am signing this object:
namespace :appsignal do | |
# Description is required for it to show up in the tasks list. | |
desc 'Notify AppSignal of this deploy!' | |
task :deploy do | |
# 1. Needs to be run inside an `on` block | |
# 2. `appsignal_roles` setting set and supplied with default | |
on roles(fetch(:appsignal_roles, :app)) do | |
env = fetch(:rails_env, 'production') | |
user = ENV['USER'] || ENV['USERNAME'] |
I hereby claim:
To claim this, I am signing this object:
"lines_map" | |
{:FREE=>-1506, :T_STRING=>1521, :T_ARRAY=>100, :T_DATA=>0, :T_MATCH=>0, :T_NODE=>0} | |
"each_line_inject" | |
{:FREE=>-1901, :T_STRING=>1500, :T_ARRAY=>0, :T_DATA=>100, :T_MATCH=>0, :T_NODE=>300} | |
"map_if" | |
{:FREE=>-2001, :T_STRING=>1900, :T_ARRAY=>100, :T_DATA=>0, :T_MATCH=>0, :T_NODE=>0} | |
"reject_map" | |
{:FREE=>-1801, :T_STRING=>1600, :T_ARRAY=>200, :T_DATA=>0, :T_MATCH=>0, :T_NODE=>0} | |
"gsub" | |
{:FREE=>-1602, :T_STRING=>1301, :T_ARRAY=>0, :T_DATA=>0, :T_MATCH=>200, :T_NODE=>100} |
# Paperclip gem | |
# How to fix the issue with ImageMagick crashing on non-image files. | |
# Must be placed before has_attached_file | |
# Source: http://awesomeful.net/posts/33-attach-non-image-files-in-rails-with-paperclip | |
before_post_process :image? | |
def image? | |
!({your_model}_content_type =~ /^image.*/).nil? | |
end |
# config/initializers/spree_config.rb | |
# Check if Spree::Config is loaded | |
# If you don't you'll get an error on migrate (the first time only) | |
if Spree::Config.instance | |
Spree::Config.set(:default_locale => "nl-NL") | |
end |
curl -s -d'postdata=something' -D- http://url -o/dev/null |
# app/assets/javascripts/failer.js.coffee | |
class Failer | |
ze: (i) -> | |
i + "wa" | |
window.failer = new Failer |
# spec/javascripts/templates/hello.jst.eco | |
<h1>Hello <%= @name %>!</h1> | |
# Eco uses instance variables for variables given by the test |
# From: https://github.com/ryanb/cancan/pull/757 | |
# Here for reference | |
## | |
# Tell CanCan to use the user-controller resource_params method | |
# rather than its own (when the user-method) is available | |
module CanCan | |
class ControllerResource | |
def resource_params |
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |