This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jaydorsey on github. | |
* I am jaydorsey (https://keybase.io/jaydorsey) on keybase. | |
* I have a public key whose fingerprint is 49FE 92BB A9CA 354B E9C5 BBFD 842C 2651 0307 ECA6 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install pronto pronto-brakeman pronto-coffeelint pronto-fasterer pronto-flay pronto-haml pronto-jshint pronto-poper pronto-rails_best_practices pronto-rails_schema pronto-reek pronto-rubocop pronto-scss pronto-rails_schema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mirror CI/CD version bundler with your Gemfile.lock version | |
gem install bundler --no-document --version $(tail -n 1 Gemfile.lock) | sed -e 's/^[[:space:]]*//' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Block things on LinkedIn with uBlock Origin that LinkedIn won't let you block | |
# Choose "Options" in uBlock Origin with a right-click, and add these to | |
# "My filters" | |
# ADDING YOUR OWN FILTERS | |
# | |
# Using Linkedin.com as an example | |
# | |
# 1. Open up the webpage | |
# 2. Find some text you want to block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW". | |
chars. | |
chunk_while { |before, after| before == after }. | |
reduce(String.new) { |memo, group| memo << "#{group.size}#{group.first}" } | |
rle = -> (str) { str.chars.chunk_while{ |b, a| b == a }.reduce(""){ |m, g| m << g.length.to_s << g.first } } | |
rle.call("WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Append this alias to your .zshrc or .bashrc | |
# | |
# Run `guardme` from any exercise directory to start guard | |
# with your custom Guardfile | |
alias guardme="guard --guardfile ~/exercism/ruby/Guardfile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fib = -> { Enumerator.new { |y| a = b = 1; loop { y << a; a, b = b, a + b } } } | |
puts fib.call.take(20) | |
x = fib.call | |
x.next => 1 | |
x.next => 1 | |
x.next => 2 | |
... | |
x.next => 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Don't run this unless you know why you're running this | |
gem outdated | awk '{print $1}' | xargs gem update $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
# This file goes in .git/hooks/post-receive | |
if git diff-tree --name-status -t -r --root HEAD | grep -q 'development.sql' | |
then | |
echo "Your db/data/development.sql file changed. You may want to run rails gs:load" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Automatically clicks the "Remove" button for all the advertisers | |
// that are showing from this page: https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen | |
// under the "Advertisers who you've interacted with" (who I actually have never | |
// interacted with), "Who use a contact list added to facebook" (that they likely | |
// bought 2nd hand because I've never done business with them) | |
// | |
// Click the "More" button multiple times to display them all, then run this script | |
var buttons = document.querySelectorAll("[data-tooltip-content='Remove']");for (i = 0; i< buttons.length; i++) { buttons[i].click();}; |
OlderNewer