TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.
| # Git pre-commit hook to check all staged Ruby (*.rb/haml/coffee) files | |
| # for Pry binding references | |
| # | |
| # Installation | |
| # | |
| # ln -s /path/to/pre-commit.sh /path/to/project/.git/hooks/pre-commit | |
| # | |
| # Based on | |
| # | |
| # http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/ |
| require 'date' | |
| require 'koala' | |
| class BirthdayLiker | |
| FACEBOOK_TOKEN = 'your_oauth_key' | |
| BIRTHDAY_WORDS = %w(birthday bday birfday birth born) | |
| THANKS_OPTIONS = ['Thank you!', 'Thanks!', 'Appreciate it!'] | |
| DATE_TIME_FORMAT = '%Y-%m-%d' | |
| def initialize(birthdate, opts={}) |
| var selector = 'img' // Replace this with the selector for the element you want to make transformable | |
| jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() { | |
| jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() { | |
| (function() { | |
| var $, applyTransform, getTransform, makeTransformable; | |
| $ = jQuery; |
| class TrumpSort | |
| def initialize(arr) | |
| @arr = arr | |
| @wall = nil | |
| @sorted = [] | |
| end | |
| def sort | |
| @arr.each {|n| looper(n)} | |
| @sorted |
| # Cleanup old node_modules | |
| echo "Cleaning node_modules in projects older than 30 days" | |
| find . -name "node_modules" -type d -mtime +30 | xargs rm -rf | |
| echo "Done cleaning node_modules" | |
| # Clean up homebrew | |
| echo "Clean homebrew" | |
| brew update && brew upgrade && brew cleanup | |
| echo "Done cleaning homebrew" |