rails stats:controllers # Show basic controller usage stats
rails stats:models # Show basic model usage stats
rails stats:trends # show frequency trends for a date column; MODEL=x COLUMN=y
rails stats:unroutable # Find routes that will raise a routing error when requested
rails stats:users # Show basic details of users
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
#!/usr/bin/env python3 | |
import sys | |
import requests | |
import os | |
import json | |
LINEAR_API_KEY = os.environ.get('LINEAR_API_KEY') | |
TEAM_ID = os.environ.get('LINEAR_TEAM_ID') | |
if not LINEAR_API_KEY or not TEAM_ID: |
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
#!/usr/bin/env ruby | |
# Encoding: utf-8 | |
# | |
# This takes a csv file of values, and a txt file as a template | |
# and sends out a pile of customized emails. | |
# | |
require 'csv' | |
require 'mail' |
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
/* global $ */ | |
/** | |
* ajax-frames v1.1.0 | |
* pre-requisites: jquery | |
* compatible with: rails-ujs | |
* | |
* Exports: | |
* - ajax_frames_init(container) - Automatically runs on document ready for the entire document. | |
* - load_ajax_frames_multi(url) | |
* |
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
#!/usr/bin/env ruby | |
require 'thor' | |
require 'uri' | |
require 'net/http' | |
require 'json' | |
# > llme joke | |
# Sure! Here's one: | |
# |
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
namespace :doc do | |
desc 'generate yardoc docs in doc/app/index.html' | |
task :app do | |
`yard doc -o doc/app` | |
puts "see doc/app/index.html" | |
end | |
desc 'annotate models' | |
task :annotate do | |
run = ->(cmd){ |
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
#!/usr/bin/env ruby | |
# Given a file and method_name | |
# Show all the different implementations across the git history (first commit per implementation). | |
# | |
# show_method_history <file> <method_name> --html | |
# | |
# e.g. show_method_history test/test_helper.rb sign_in --html | |
# | |
# WARNING: the --html output just dumps html files into your current folder. | |
# |
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
#!/usr/bin/env ruby | |
# | |
# Find the last version that passes the tests by doing | |
# a binary search through a range of versions | |
# | |
# Usage: gem-bisect <gem_name> [<from_version> [<to_version>]] | |
# | |
# Example | |
# ❯ gem-bisect rack-attack 6.3 6.6.1 | |
# Checking versions 6.6.1, 6.5.0, 6.4.0, 6.3.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
#!/usr/bin/env ruby | |
require 'chronic' | |
require 'set' | |
if ARGV.empty? | |
ARGV.replace ['log/production.log'] | |
end | |
# From facets gem | |
module Enumerable |
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
# Add this to your config/initializers/ folder. | |
if Kernel.const_defined?('ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter') | |
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_booleans = false | |
# Version 7.0.2 of activerecord-oracle_enhanced-adapter loads the types into | |
# a constant TYPE_MAP when the class is loaded | |
# | |
# This is so early in the process that there is no opertunity to change the | |
# default value of emulate_booleans, so that config is ineffective in that |
NewerOlder