I hereby claim:
- I am gtd on github.
- I am gtd (https://keybase.io/gtd) on keybase.
- I have a public key whose fingerprint is 6A21 777F D1B1 978E E1C4 56CF 6216 0416 3F17 C9CF
To claim this, I am signing this object:
| # This class returns a set of *.rb files which are not present in a SimpleCov resultset | |
| # | |
| require 'json' | |
| require 'set' | |
| class CoverageChecker | |
| def missed_files(dir = 'app') | |
| uncovered_files(dir) | |
| end |
| api_key = 'KqdN3zU5csyXqoEExjMx' | |
| ma_project_id = '40406' | |
| no_viewing_fault_id = '9518398' | |
| project_id = ma_project_id | |
| fault_id = no_viewing_fault_id | |
| notices_url = "https://api.honeybadger.io/v1/projects/#{project_id}/faults/#{fault_id}/notices?auth_token=#{api_key}" |
I hereby claim:
To claim this, I am signing this object:
| module RandomCode | |
| extend self | |
| def generate(size = 8) | |
| charset = %w{ 2 3 4 6 7 9 A C D E F G H J K M N P Q R T U V W X Y Z } | |
| (0...size).map{ charset[SecureRandom.random_number(charset.size)] }.join | |
| end | |
| end |
| function rt { | |
| if [ $# -le 1 ] ; then | |
| echo Running: ruby -Itest $1 | |
| ruby -Itest $1 | |
| else | |
| p2=$2 | |
| param=$p2[0,5] | |
| if [ $param = 'test/' ] ; then # Assumes all test files are in test/** | |
| while [ "$1" != "" ]; do | |
| if [ ! $test_files ]; then |
| awk ' | |
| /^Started .+ "\/services\/samsung/ {printf("\n");flag=1} | |
| flag {print} | |
| /^Completed /{flag=0} | |
| ' production.log | |
| cat production.log | awk ' | |
| /^Started PUT "\/staged\/films\/.*\/still"/ {printf("\n");flag=1} | |
| flag {print} | |
| /^ User ID: /{flag=0} |
| #!/usr/bin/env ruby | |
| # Evaluates a sample of keys/values from each redis database, computing statistics for each key pattern: | |
| # keys: number of keys matching the given pattern | |
| # size: approximation of the associated memory occupied (based on size/length of value) | |
| # percent: the proportion of this 'size' relative to the sample's total | |
| # | |
| # Copyright Weplay, Inc. 2010. Available for use under the MIT license. | |
| class PalindromeFinder | |
| def initialize(string) | |
| @input = string | |
| end | |
| def longest | |
| max, out = 0, '' | |
| @input.chars.to_a.each_index do |i| | |
| index, length = max_palindrome(i) | |
| max, out = [length, @input[index, length]] if length > max |