I hereby claim:
- I am tjchambers on github.
- I am tjchambers (https://keybase.io/tjchambers) on keybase.
- I have a public key whose fingerprint is BD43 BA87 BEEC 388A E656 ED97 D35D C57D ABC0 60CA
To claim this, I am signing this object:
| Application.put_env(:sample, Example.Endpoint, | |
| http: [ip: {127, 0, 0, 1}, port: 5001], | |
| server: true, | |
| live_view: [signing_salt: "aaaaaaaa"], | |
| secret_key_base: String.duplicate("a", 64) | |
| ) | |
| Mix.install([ | |
| {:plug_cowboy, "~> 2.5"}, | |
| {:jason, "~> 1.0"}, |
| class CSV | |
| def self.open(file, options={}, &block) | |
| encoding = options.delete(:encoding) | |
| File.open(file, "r:#{encoding}") do |fd| | |
| yield CSV.new(fd, options) | |
| end | |
| end | |
| end |
| = javascript_include_tag 'searcher' | |
| .text-right{ style: 'padding-bottom:14px;font-size:1.2em' } | |
| .fa.fa-search.ico-place | |
| %input{ style: '-webkit-appearance:searchfield;font-family: FontAwesome;', | |
| type: 'search', | |
| placeholder: 'Search ...', | |
| onKeyUp: 'ds(this.value)', | |
| onClick: 'ds(this.value)', | |
| size: 27, | |
| id: 'search_box' } |
| = javascript_include_tag 'searcher' | |
| .text-right{ style: 'padding-bottom:14px;font-size:1.2em' } | |
| .fa.fa-search.ico-place | |
| %input{ style: '-webkit-appearance:searchfield;font-family: FontAwesome;', | |
| type: 'search', | |
| placeholder: 'Search ...', | |
| onKeyUp: 'ds(this.value)', | |
| onClick: 'ds(this.value)', | |
| size: 27, | |
| id: 'search_box' } |
| /** | |
| * Created by tj on 12/26/14. | |
| */ | |
| function ds(text) { | |
| searchless(text); | |
| $('.searchable').each(function () { | |
| if (text.length < 2 || $(this).html().replace(/<\/?[^>]+>/gi, '|').search(r) >= 0) { | |
| $(this).show(); | |
| } else { |
| # From http://stackoverflow.com/a/13423584/153896 | |
| module ActiveRecord | |
| class QueryCounter | |
| attr_reader :query_count | |
| def initialize | |
| @query_count = 0 | |
| end | |
| def to_proc |
I hereby claim:
To claim this, I am signing this object:
| namespace :mutant do | |
| MUTANT_VERSION = `mutant --version`.strip.split('-').last | |
| def complete?(log) | |
| content = File.read(log) | |
| /Kills:/.match(content) | |
| end | |
| def preface(file, base) |
| # | |
| # Nginx proxy for Elasticsearch + Kibana | |
| # | |
| # In this setup, we are password protecting the saving of dashboards. You may | |
| # wish to extend the password protection to all paths. | |
| # | |
| # Even though these paths are being called as the result of an ajax request, the | |
| # browser will prompt for a username/password on the first request | |
| # | |
| # If you use this, you'll want to point config.js at http://FQDN:80/ instead of |
| class EmailAddressScrubber | |
| DUMMY = '@yahoo.com' unless defined?(DUMMY) | |
| CANDIDATES = %w(TestingInferences.com CoordinationSystem.com DifficultConversation.com Undiscussible.com RelationshipEffectiveness.com Coordinated-Action.com OptimizeAlignment.com AlignmentOptimization.com) unless defined?(CANDIDATES) | |
| def scrub(address) | |
| x = address[1].ord % CANDIDATES.size | |
| collapse(address.sub(DUMMY, "@#{CANDIDATES[x]}")) | |
| end |