I hereby claim:
- I am jameslafa on github.
- I am jameslafa (https://keybase.io/jameslafa) on keybase.
- I have a public key ASAWFkLVBvndTyh-TtPTyARV9zAKQI_CuebhX1xJkPJXnQo
To claim this, I am signing this object:
#!/bin/bash | |
for dir in */ ; do | |
# Check if there are images in the folder before moving forward | |
if [[ $(find $dir -maxdepth 1 -type f -name "*.jpg"| wc -l) -ge 1 ]]; then | |
# If there is already an instagram folder in this folder, I skip. | |
if [[ ! -d "$dir"instagram ]]; then | |
mkdir "$dir"instagram | |
fi | |
for file in "$dir"*.jpg ; do |
I hereby claim:
To claim this, I am signing this object:
In case Redis is down, the job will be perform synchronously instead of crashing.
On your job, use perform_later_with_failover instead of perform_later.
Take this into account:
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES; | |
acrobat africa alaska albert albino album | |
alcohol alex alpha amadeus amanda amazon | |
america analog animal antenna antonio apollo | |
april aroma artist aspirin athlete atlas | |
banana bandit banjo bikini bingo bonus | |
camera canada carbon casino catalog cinema | |
citizen cobra comet compact complex context | |
credit critic crystal culture david delta | |
dialog diploma doctor domino dragon drama |
#!/usr/bin/env ruby | |
# Place in your project .git/hooks/pre-commit | |
# Heavily inspired by https://raw.githubusercontent.com/balabhadra/githooks/master/pre-commit, so thank you to him | |
############# CONFIGURATION | |
# The two sections of regular expressions below ("forbidden" and "warning") | |
# will trigger a commit failure, *if* they are found on an added or edited line. |
RSpec::Matchers.define :have_same_attributes_as do |expected| | |
ignored_attributes = ['id', 'updated_at', 'created_at'] | |
match do |actual| | |
actual.attributes.except(*ignored_attributes) == expected.attributes.except(*ignored_attributes) | |
end | |
chain :except do |*attributes| | |
ignored_attributes += attributes.map {|a| a.to_s} | |
end |
RSpec.describe MyController, type: :controller do | |
include ActiveJob::TestHelper | |
describe "..." do | |
it "enqueues the job with the right arguments" do | |
expect { | |
@bookmark = post :create, {:bookmark => valid_attributes} | |
}.to have_enqueued_job(SlackNotifierJob).with { |args| | |
expect(args).to eq(["new_bookmark", @bookmark]) | |
} |
desc "switch rails logger to stdout" | |
task :verbose => [:environment] do | |
Rails.logger = Logger.new(STDOUT) | |
end | |
desc "switch rails logger log level to debug" | |
task :debug => [:environment, :verbose] do | |
Rails.logger.level = Logger::DEBUG | |
end |
# config/initializers/to_boolean.rb | |
module ToBoolean | |
def to_bool | |
return true if ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(self) | |
return false | |
end | |
end | |
class NilClass; include ToBoolean; end |
context 'when changing the selected materials', :js => true, focus: true do | |
include MoneyRails::ActionViewExtension | |
it 'updates the offers' do | |
# bla bla | |
end | |
end |