Colored for chat colors
gem install colored
It has many comments since I tried to explain what is going on for less-experienced Ruby people.
To remove a submodule you need to: | |
Delete the relevant line from the .gitmodules file. | |
Delete the relevant section from .git/config. | |
Run git rm --cached path_to_submodule (no trailing slash). | |
Commit and delete the now untracked submodule files. |
RSpec.configure do |config| | |
config.use_transactional_fixtures = false | |
config.before(:suite) do | |
DatabaseCleaner.clean_with :truncation | |
end | |
config.before(:each) do | |
if example.metadata[:js] | |
DatabaseCleaner.strategy = :truncation |
%s/\(\S\+\).should\(\s\+\)==\s*\(.\+\)/expect(\1).to\2eq(\3)/ | |
Example: | |
row.day.should == 'value' | |
expect(row.day).to eq('value') |
#!/usr/bin/env ruby | |
# cr: send an Asana ticket for code review | |
# It will add (or re-open) a sub-task called 'Code Review' owned | |
# by the specified user. | |
# Usage: | |
# cr [-a ASANA_ID] [-g GIT_COMMIT] username | |
# | |
# - If the Asana ticket ID is given, use that. |
#!/usr/bin/env ruby | |
# Put this file at ~/.heroku/plugins/busybox/init.rb | |
# Call it with 'heroku busybox' | |
require 'heroku/helpers' | |
require 'heroku/command' | |
require 'heroku/command/run' | |
class Heroku::Command::Busybox < Heroku::Command::Run |
Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
git config --global alias.checkoutr checkout
$EDITOR /usr/local/share/zsh/site-functions/git-completion.bash
...and then modify the file as follows...
-__gitcomp_nl "$(__git_refs '' $track)"
+if [ "$command" = "checkoutr" ]; then
+ __gitcomp_nl "$(__git_refs '' $track)"
+else
/* Copyright (C) 2017 Andrew Ayer | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the | |
* Software is furnished to do so, subject to the following conditions: | |
* | |
* The above copyright notice and this permission notice shall be included |