Skip to content

Instantly share code, notes, and snippets.


Joshua Sierles jsierles

Block or report user

Report or block jsierles

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f9aebc275822d158a3d83380e0c8279f
require "bundler"
require 'scout_apm/auto_instrument'
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
jsierles /
Last active Nov 19, 2018
Interview questions


Tip: even if the answer is listed here, don't ask the question if you don't fully understand the answer.

This isn't 100% a knowledge test. Questions that can't be answered should be followed by a discussion of how the answer could be discovered.

Listen for questions from the candidate

These are examples of questions that good hires would ask:

View gist:fdbca06a1dcbdb1afa3999820fd62290
class Pusher; end
module GraphQL
module Pro
class BackgroundSubscriptions < Subscriptions
alias :execute_synchronously :execute
def execute(sub_id, event, object)
SubscriptionUpdateJob.perform_later(sub_id, Base64.encode64(Marshal.dump(event)), object)
View gist:20bec9131975f6dab3aa61c9c62ab3d2
import * as Ably from 'ably'
import getConfig from 'next/config'
const { publicRuntimeConfig } = getConfig()
const config = {
authUrl: publicRuntimeConfig.realtimeAuthUrl,
// setting an Authorization header enables withCredentials,
// needed for our cookie auth to the backend
authHeaders: {
authorization: 'none'
View intercom.widget.js
'use strict';
!function(modules) {
* @param {number} moduleId
* @return {?}
function __webpack_require__(moduleId) {
if (installedModules[moduleId]) {
return installedModules[moduleId].exports;
View gist:6e6ebb33ea51950f8c7da35b32f7ae53
checking for __linux__... yes
checking for -lrt... yes
checking for stdatomic.h... yes
creating Makefile
current directory: /usr/local/bundle/gems/scout_apm-3.0.0.pre25/ext/stacks
make "DESTDIR=" clean
current directory: /usr/local/bundle/gems/scout_apm-3.0.0.pre25/ext/stacks
make "DESTDIR="
View gist:cba74e47d9b3d1edf988e7fea7e3975f
Step 5/6 : RUN npm install -g pm2
---> Running in 43e24ba37ed0
npm WARN registry Unexpected warning for Miscellaneous Warning EINTEGRITY: sha1-QFUCsAfzGcP0cXXER0UnMA8qta0= integrity checksum failed when using sha1: wanted sha1-QFUCsAfzGcP0cXXER0UnMA8qta0= but got sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA==. (260 bytes)
npm WARN registry Using stale package data from due to a request error during revalidation.
/usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2
/usr/local/bin/pm2-dev -> /usr/local/lib/node_modules/pm2/bin/pm2-dev
/usr/local/bin/pm2-docker -> /usr/local/lib/node_modules/pm2/bin/pm2-docker
/usr/local/bin/pm2-runtime -> /usr/local/lib/node_modules/pm2/bin/pm2-runtime
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/pm2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","
View gist:3f990def5e923f9d5504478246d03316
404 -rw-r--r-- 1 root root 410433 Jun 4 12:00 application-4d0aabdb41b2ffd005f5fd834b2907da1698d7a426a7c4c0ec36602d5e1e49c6.js
104 -rw-r--r-- 1 root root 103187 Jun 4 12:00 application-4d0aabdb41b2ffd005f5fd834b2907da1698d7a426a7c4c0ec36602d5e1e49c6.js.gz
424 -rw-r--r-- 1 root root 433187 Apr 4 17:21 application-65a61040181f59b1707ffd11d9c94e087c256a38f7cf979b35515084bb109da2.js
112 -rw-r--r-- 1 root root 112842 Apr 4 17:21 application-65a61040181f59b1707ffd11d9c94e087c256a38f7cf979b35515084bb109da2.js.gz
404 -rw-r--r-- 1 root root 410410 Jun 7 11:38 application-6bb33460948612a3e9e2f3da9e3c150d4449e3b547db2ad17467cfa6dca074dc.js
104 -rw-r--r-- 1 root root 103185 Jun 7 11:38 application-6bb33460948612a3e9e2f3da9e3c150d4449e3b547db2ad17467cfa6dca074dc.js.gz
View gist:07d377509d7ffe85c965a28f60fb88ec
COPY config config
COPY Rakefile Rakefile
COPY app/models/application_record.rb app/models/application_record.rb
COPY lib/transactional_mail.rb lib/transactional_mail.rb
COPY vendor/assets vendor/assets
COPY app/models/user.rb app/models/user.rb
COPY app/assets app/assets
View gist:2414e97a4e89ee6ef0db70c687343c37
2018-06-01T16:53:13Z service/timers:RWONHCRWYFM/b3b652bee086 [1] Puma starting in cluster mode...
2018-06-01T16:53:13Z service/timers:RWONHCRWYFM/b3b652bee086 [1] * Version 3.9.1 (ruby 2.4.1-p111), codename: Private Caller
2018-06-01T16:53:13Z service/timers:RWONHCRWYFM/b3b652bee086 [1] * Min threads: 5, max threads: 5
2018-06-01T16:53:13Z service/timers:RWONHCRWYFM/b3b652bee086 [1] * Environment: staging
2018-06-01T16:53:13Z service/timers:RWONHCRWYFM/b3b652bee086 [1] * Process workers: 3
2018-06-01T16:53:13Z service/timers:RWONHCRWYFM/b3b652bee086 [1] * Preloading application
2018-06-01T16:53:19Z service/timers:RWONHCRWYFM/b3b652bee086 [1] Use Ctrl-C to stop
2018-06-01T16:53:19Z service/timers:RWONHCRWYFM/b3b652bee086 [1] ! WARNING: Detected 1 Thread(s) started in app boot:
2018-06-01T16:53:19Z service/timers:RWONHCRWYFM/b3b652bee086 [1] ! #<Rack::MiniProfiler::FileStore::CacheCleanupThread:0x00000007718458@/usr/local/bundle/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/storage/file_store.rb:60 sleep> - /
You can’t perform that action at this time.