I hereby claim:
- I am sshkarupa on github.
- I am sshkarupa (https://keybase.io/sshkarupa) on keybase.
- I have a public key ASB6KLzzD7c6kcrDMpj4Yez-HTtg-aU7fMDKwDTDIIllDQo
To claim this, I am signing this object:
FROM postgres:12-alpine | |
MAINTAINER Jordan Gould <jordangould@gmail.com> | |
# Based on https://github.com/andreaswachowski/docker-postgres/blob/master/initdb.sh | |
ENV PG_JOBMON_VERSION v1.3.3 | |
ENV PG_PARTMAN_VERSION v4.2.2 | |
# Install pg_jobmon | |
RUN set -ex \ | |
\ |
I hereby claim:
To claim this, I am signing this object:
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
tap 'homebrew/bundle' | |
tap 'homebrew/cask' | |
tap 'homebrew/core' | |
brew 'zsh' | |
brew 'ansible' | |
brew 'awscli' | |
brew 'webp' | |
brew 'gist' | |
brew 'git' | |
brew 'jq' |
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.
class Saga | |
class << self | |
def with_redis; raise NotImplementedError; end | |
attr_accessor :cleanup_delay, :queue, :last_txid | |
def queue | |
Thread.current[:saga_queue] ||= [] | |
end | |
def last_txid |
module SimpleRailway | |
class Result | |
attr_accessor :success, :data | |
def initialize(success, data) | |
@success = success | |
@data = data | |
end | |
def success?; !!success; end | |
def failure?; !success?; end |
# Usage: | |
# | |
# class Mail | |
# include SimpleStateMachine | |
# | |
# self.initial_state = 'unread' | |
# self.transitions_map = { | |
# read: {from: 'unread', to: 'read'}, | |
# unread: {from: 'any', to: 'unread'}, | |
# delete: {from: 'any', to: 'deleted'}, |
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
#payload: [{"kind"=>"person"}] | |
Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
#data: {"interest"=>["music", "movies", "programming"]} | |
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
Segment.where("jsonb_array_length(data->'interest') > 1") |