I hereby claim:
- I am jpterry on github.
- I am jpterry (https://keybase.io/jpterry) on keybase.
- I have a public key ASAompS9pHRt4J0VI14O23klN3ZMTjoRDC0brxAg5UJ2vQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' | 
| require 'csv' | |
| class FileSplitter | |
| SPLIT_COUNT = 250_000 | |
| COPY_HEADERS = true | |
| def initialize(filename) | |
| @filename = filename | |
| @header = nil | |
| @file_count = 1 | 
| # Excel column string to 0 indexed position | |
| def self.excel_col_to_index(str) | |
| offset = 'A'.ord - 1 | |
| str.upcase.chars.inject(0) { |x,c| x * 26 + c.ord - offset } - 1 | |
| end | |
| # 0 based index to column letter | |
| def self.index_to_excel_col(index) | |
| 'A'.tap do |name| | |
| index.times { name.succ! } | 
| def write_csv(excelx_filename, outfile_name) | |
| CSV.open(outfile_name, "wb") do |csv| | |
| Roo::Excelx.new(excelx_filename, minimal_load: true).each_row_streaming do |row_cells| | |
| csv << row_cells.map(&:value) | |
| end | |
| end | |
| end | 
| #!/usr/bin/env ruby# | |
| # encoding: utf-8 | |
| require 'thor' | |
| require 'octokit' | |
| require 'etc' | |
| class GithubKeyGenerator < Thor | |
| include Thor::Actions | |
| GITHUB_KEY_NAME = 'github_key' | 
| lib/elixir_sips_downloader/extractors/catalog.rb | 
| class Class | |
| def descendants | |
| ObjectSpace.each_object(::Class).select {|klass| klass < self } | |
| end | |
| end | 
| should "contain a sip_number_format that doesn't allow nil or bogus" do | |
| @sip_integration.set!(:sip_number_format => :E164) | |
| assert_raise ActiveRecord::StatementInvalid, /sip_number_format' cannot be null/ do | |
| @sip_integration.set!(:sip_number_format => nil) | |
| end | |
| assert_equal :E164, @sip_integration.sip_number_format | |
| end | 
| diff --git a/lib/token_generator.rb b/lib/token_generator.rb | |
| index 8481154..a80ca28 100644 | |
| --- a/lib/token_generator.rb | |
| +++ b/lib/token_generator.rb | |
| @@ -2,7 +2,6 @@ | |
| module TokenGenerator | |
| def self.generate | |
| - random_text = ([Time.now.to_f] + (1..10).map{rand}).join('--') | |
| - ActiveSupport::Base64.encode64_url(Digest::SHA1.digest(random_text)) |