- Taipei 101
- Tamsui
- National Palace Museum
- Shi-men Ting
- Tonghua Night Market - my favorite
- There are some great bars nearby!
@next_upgrade ||= false | |
source 'https://rubygems.org' | |
if @next_upgrade | |
gem 'rails', '5.0.0.beta3' | |
gem 'rails-controller-testing' # https://github.com/rails/rails-controller-testing | |
else | |
gem 'rails', '~> 4.2.5.1' | |
end |
class Foo | |
@@bar = "123" | |
def bar | |
@@bar | |
end | |
class << self | |
def set_bar(bar) | |
@bar = bar |
package main | |
func main() { | |
Start(os.Stdin, os.Stdout) | |
} | |
/* | |
This will behaves like: | |
>> 1 + 1 | |
#=> 2 |
myFst :: (a, b) -> a | |
myFst (a, b) = a | |
myOdd :: Int -> Bool | |
myOdd x = odd x | |
qs :: Ord a => [a] -> [a] | |
qs [] = [] | |
qs (x:xs) = qs ys ++ [x] ++ qs zs | |
where |
module URLHelper | |
IP_HOST_REGEXP = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ | |
HOST_REGEXP = /(^[^:]+:\/\/)?(\[[^\]]+\]|[^:]+)(?::(\d+$))?/ | |
PROTOCOL_REGEXP = /^([^:]+)(:)?(\/\/)?$/ | |
class << self | |
def url_for(options) | |
if options[:only_path] | |
path_for options | |
else |
require 'io/console/size' | |
# Usage: Replace a Queue.new with DebugQueue.new(Queue.new) | |
class DebugQueue < SimpleDelegator | |
def <<(*msg, trace: caller_locations(3, 3)) | |
debug_print("<<", msg, trace) | |
super(*msg) | |
end |
This is a bit different from the challenge's script because it's directly copied from the issue.
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
This challenge tests if you can locate the cause of a Rails issue in 5 iterations (script execution). Although it's a Rails issue, prior knowledge on Rails is not required.
The 5 iterations limit may feel constraining, but it is intentional. If you can't locate the cause within the limitation, that's totally fine.
After the challenge, there's a simple questionnaire. If you can answer the questions, it'll help me prepare my talk for RubyKaigi. Any feedback will be appreciated 🙏
I recommend allocating 1.5 hr for the challenge and the questions