Want to use Sidekiq's exponential backoff, but give up sooner? This table will help you pick a retry number.
class MyWorker
...
sidekiq_options retry: N
...
end
# Stick this in your home directory and point your Global Git config at it by running: | |
# | |
# $ git config --global core.attributesfile ~/.gitattributes | |
# | |
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
*.c diff=cpp | |
*.h diff=cpp | |
*.c++ diff=cpp | |
*.h++ diff=cpp |
Quick git tip: Most of you know (and love) git's "bisect" command, but how many have used "git bisect run"? Specify a shell script/command, and git will automatically run it on each bisect step. If it exits with a 0, the commit is marked "good". Anything else, and the commit is marked "bad". | |
For example, want to find the cause of a failing test? | |
git bisect start <failing commit> <passing commit> | |
git bisect run sh -c '(cd app && grunt test)' | |
Voila! Git will automatically find the first commit in the given range that fails the tests. | |
http://git-scm.com/docs/git-bisect#_bisect_run |
import code; code.interact(local=dict(globals(), **locals())) |
#!/bin/sh | |
# this script does absolutely ZERO error checking. however, it worked | |
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers | |
# and/or URLs should be made variables. cheers, [email protected] | |
mkdir mosh | |
cd mosh |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
TEMP_DIR:=$(shell mktemp -d -t /tmp) | |
MARKDOWN=perl Resources/Markdown.pl | |
WKHTMLTOPDF=/usr/local/bin/wkhtmltopdf | |
BUILD_DIR=Build | |
MD_OUTPUT=Documentation.md | |
HTML_OUTPUT=Documentation.html | |
PDF_OUTPUT=Documentation.pdf | |
COVER=__Couverture |
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Synchronous (blocking) | |
# Returns the output of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |