_ __
/' `\ ( ~-_ /'
/' ) /`-__)
/' ____ ____ /' O. ,
/' _ /' ) /' )-- /' /' \ /
/' ' )/(___,/' /' /' /' /' \'
(_____,/'(________(___,/'(,/(_, (__ __/' \_
This file contains hidden or 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
| def email_text_field | |
| return @email_text_field if @email_text_field | |
| @email_text_field = UITextField.alloc.initWithFrame([[0, 0], [225, 40]]) | |
| @email_text_field.center = CGPointMake(self.view.frame.size.width / 2, (self.view.frame.size.height / 2) - 60) | |
| @email_text_field.placeholder = "tobias@funke.com" | |
| @email_text_field.borderStyle = UITextBorderStyleRoundedRect | |
| @email_text_field | |
| end |
This file contains hidden or 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
| module Workflows | |
| class Base | |
| attr_reader :errors | |
| def self.call(*args) | |
| new(*args).call | |
| end | |
| def initialize(params) | |
| @params = __params(params) |
This file contains hidden or 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
| class Thinger | |
| def run! | |
| [:first_thing, :second_thing, :third_thing].map do |meth_name| | |
| begin | |
| self.method(meth_name).call | |
| rescue => e | |
| puts "There was a problem running: #{meth_name}" | |
| next | |
| end |
This file contains hidden or 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
| require 'benchmark' | |
| result = Benchmark.bm(7) do |x| | |
| x.report("Arrays of JSON") do | |
| ActiveRecord::Base.connection.execute(%{select row_to_json(prompts) as json from prompts order by id asc;}).to_a.each do |prompt| | |
| Oj.load(prompt['json']) | |
| end | |
| end | |
| x.report("Single JSON Object") do | |
| Oj.load(ActiveRecord::Base.connection.execute(%{ |
I hereby claim:
- I am thekidcoder on github.
- I am thekidcoder (https://keybase.io/thekidcoder) on keybase.
- I have a public key ASBp94rsTbCK-x5jHwbMKWK1G386PIMDYBP2ztwWUeplvgo
To claim this, I am signing this object:
This file contains hidden or 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
| NoMethodError: undefined method `names' for nil:NilClass | |
| …actionpack-4.2.9/lib/action_dispatch/journey/router.rb: 116:in `block in find_routes' | |
| .org/jruby/RubyArray.java:2518:in `map!'(undefined | |
| …actionpack-4.2.9/lib/action_dispatch/journey/router.rb: 113:in `find_routes' | |
| …actionpack-4.2.9/lib/action_dispatch/journey/router.rb: 30:in `serve' | |
| …ionpack-4.2.9/lib/action_dispatch/routing/route_set.rb: 817:in `call' | |
| …/new_relic/agent/instrumentation/middleware_tracing.rb: 92:in `call' | |
| …uby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb: 189:in `call!' | |
| …uby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb: 167:in `call' | |
| …/new_relic/agent/instrumentation/middleware_tracing.rb: 92:in `call' |
This file contains hidden or 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
| /** | |
| * Dutchie Cloudflare Store-Front Proxy | |
| * | |
| * This worker is intended to be installed on customer-managed Cloudflare accounts to proxy | |
| * Dutchie Storefront traffic to the appropriate destination domain and optionally rewrite | |
| * non-proxied requests based on configured domain mappings. | |
| * | |
| * Example install scope: https://northcannabisco.com/* -> dutchie-proxy-script | |
| * | |
| * Environment variables: |
OlderNewer