See https://github.com/romainl/vim-rnb for an up-to-date version.
| module Models.Language exposing (..) | |
| import Json.Decode exposing (int, string, decodeString, Decoder) | |
| import Json.Decode.Pipeline exposing (decode, required) | |
| type alias Language = | |
| { id : Int | |
| , name : String | |
| , label : String |
| port module Spelling exposing (..) | |
| import Html exposing (..) | |
| import Html.App as App | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (..) | |
| import String | |
| main = |
| ;; Enable ligatures without prettify-symbols | |
| (provide 'add-pragmatapro-symbol-keywords) | |
| (defconst pragmatapro-fontlock-keywords-alist | |
| (mapcar (lambda (regex-char-pair) | |
| `(,(car regex-char-pair) | |
| (0 (prog1 () | |
| (compose-region (match-beginning 1) | |
| (match-end 1) |
| module Shopify.Product.Model where | |
| type alias Product = | |
| { created_at : String, | |
| id : Int, | |
| product_type : String, | |
| published_at : String, | |
| published_scope : String, | |
| title : String, | |
| updated_at : String, |
| gem 'rails', '4.2.1' # prob works on others, too, but this is the one I figured it out on | |
| require "rails" | |
| require 'active_record' | |
| require 'action_controller/railtie' | |
| require 'action_view/railtie' | |
| # ===== Configuration ===== | |
| Rails.logger = ActiveRecord::Base.logger = Logger.new $stdout | |
| ActiveSupport::LogSubscriber.colorize_logging = false |
| class Api::UploadsController < ApiController | |
| def create | |
| @upload = Upload.new(upload_params) | |
| ensure | |
| clean_tempfile | |
| end | |
| private |
| defmodule XmlNode do | |
| require Record | |
| Record.defrecord :xmlAttribute, Record.extract(:xmlAttribute, from_lib: "xmerl/include/xmerl.hrl") | |
| Record.defrecord :xmlText, Record.extract(:xmlText, from_lib: "xmerl/include/xmerl.hrl") | |
| def from_string(xml_string, options \\ [quiet: true]) do | |
| {doc, []} = | |
| xml_string | |
| |> :binary.bin_to_list | |
| |> :xmerl_scan.string(options) |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.