Skip to content

Instantly share code, notes, and snippets.

View jsierles's full-sized avatar
🎯
Focusing

Joshua Sierles jsierles

🎯
Focusing
View GitHub Profile
@jsierles
jsierles / interviews.md
Last active November 19, 2018 09:11
Interview questions

Interviews

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:

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)
end
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'
'use strict';
!function(modules) {
/**
* @param {number} moduleId
* @return {?}
*/
function __webpack_require__(moduleId) {
if (installedModules[moduleId]) {
return installedModules[moduleId].exports;
}
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="
Step 5/6 : RUN npm install -g pm2
---> Running in 43e24ba37ed0
npm WARN registry Unexpected warning for https://registry.npmjs.org/: 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 https://registry.npmjs.org/ 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","
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
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
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> - /
@jsierles
jsierles / gist:1d33ae4084917b9052c96af8fcdccccb
Created March 15, 2018 11:50
Example Guix profile bootstrap
# Source this file to define all the relevant environment variables in Bash
# for this profile. You may want to define the 'GUIX_PROFILE' environment
# variable to point to the "visible" name of the profile, like this:
#
# GUIX_PROFILE=/path/to/profile ; \
# source /path/to/profile/etc/profile
#
# When GUIX_PROFILE is undefined, the various environment variables refer
# to this specific profile generation.