I hereby claim:
- I am richardsondx on github.
- I am richardsondx (https://keybase.io/richardsondx) on keybase.
- I have a public key ASAbWDn-nbRVwC_v7ul--0bEjDuiQ6JqT-lW8XPJXXineQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class String | |
# ..... some code | |
# | |
# See ActiveSupport::Inflector.humanize. | |
def humanize(capitalize: true, keep_id_suffix: false) | |
ActiveSupport::Inflector.humanize(self, capitalize: capitalize, keep_id_suffix: keep_id_suffix) | |
end | |
# .... more codee | |
end |
class CreateRetweets < ActiveRecord::Migration | |
def change | |
create_table :retweets do |t| | |
t.string :content | |
t.integer :user_id | |
t.integer :micropost_id | |
t.timestamps | |
end | |
add_index :retweet, [:micropost_id, :created_at] |
# This project is a fork from https://gist.github.com/1254319 that I updated | |
# ~ (http://richardsondx.github.com) | |
#!/usr/bin/env ruby -Ku | |
require "nokogiri" | |
require "iconv" | |
# opens every file in the given dir tree and converts any html img tags to rails image_tag calls |
# jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 25.72-b15 on 1.8.0_72-b15 +jit [darwin-x86_64] | |
# Rails 3.2.13 | |
cache error: undefined class/module Rack::Handler::Servlet::DefaultEnv | |
org/jruby/RubyMarshal.java:145:in `load' | |
/Users/richardson/.rvm/gems/jruby-9.0.5.0/gems/actionpack-3.2.13/lib/action_dispatch/http/rack_cache.rb:18:in `read' | |
/Users/richardson/.rvm/gems/jruby-9.0.5.0/gems/rack-cache-1.6.1/lib/rack/cache/meta_store.rb:30:in `lookup' | |
/Users/richardson/.rvm/gems/jruby-9.0.5.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:173:in `lookup' | |
/Users/richardson/.rvm/gems/jruby-9.0.5.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:66:in `call!' | |
/Users/richardson/.rvm/gems/jruby-9.0.5.0/gems/rack-cache-1.6.1/lib/rack/cache/context.rb:51:in `call' |
# Code smell | |
gem 'rubocop' | |
gem "rubycritic", require: false | |
gem 'reek' | |
gem 'simplecov', require: false | |
gem 'gemsurance' | |
# Better error page for Rack apps | |
gem "better_errors" | |
gem "binding_of_calle" |
# In Rails, add this to your Initializer/ folder | |
# | |
# Fix by @richardsondx - Richardson Dackam | |
# | |
# Thi monkey patch is not actually forcing farady to uncompress the response but it's telling it not to compress | |
# So it forces Faraday to avoid compressing the response. | |
# The gresponse from google had the header 'accept-encoding': 'gzip' | |
# unlike http.net, http.request doesn't automatically uncompress gzip request | |
# more info about http.request at https://github.com/ruby/ruby/blob/ruby_2_2/lib/net/http.rb |
// compose is the compose window element | |
// Here I'm clicking the x button on the compose window. But it Doesn't seem to work or trigger a save. | |
$(compose).find('[aria-label="Save & Close"]').trigger('click'); | |
// select subject to trigger a Save, not sure if that works. | |
$(compose).find('input[name=subjectbox]').trigger('select'); | |
// Reload Page | |
$.ajax({ | |
url: window.location.href, |