Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Joshua Sierles jsierles

🎯
Focusing
View GitHub Profile
View do-convox.sh
#!/bin/bash
#
# Fetch DO registry credentials and set them in Convox
doctl_path=$(which doctl)
convox_path=$(which convox)
if [ ! -x "$doctl_path" ] || [ ! -x "$convox_path" ]; then
echo "'doctl' and 'convox' CLIs must be installed to run this script."
fi
View terraform fastly idempotency
- syslog {
- address = "syslog-a.logdna.com" -> null
- format = "%h %l %u %t \"%r\" %>s %b" -> null
- format_version = 1 -> null
- message_type = "classic" -> null
- name = "LogDNA" -> null
- port = 12345 -> null
- tls_ca_cert = <<~EOT
-----BEGIN CERTIFICATE-----
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
View notworking.yml
steps:
- label: ":docker: Build"
env:
- DOCKER_BUILDKIT=1
- COMPOSE_DOCKER_CLI_BUILD=1
plugins:
- docker-compose#v3.1.0:
build: app
- wait
View stripe_sub.rb
current_subscription_phase = stripe_schedule.phases.first
stripe_schedule.save(
phases: [
current_subscription_phase,
{
start_date: current_subscription_phase.end_date,
plans: [
{ plan: target_plan.code }
]
}
View gist:dba199ae493d7ff71133f5201dc7ef1d
Error: serviceaccounts "fluentd" is forbidden: User "system:anonymous" cannot get resource "serviceaccounts" in API group "" in the namespace "kube-system"
Error: clusterroles.rbac.authorization.k8s.io "router" is forbidden: User "system:anonymous" cannot get resource "clusterroles" in API group "rbac.authorization.k8s.io" at the cluster scope
Error: clusterroles.rbac.authorization.k8s.io "cb-staging-eu-do-fluentd" is forbidden: User "system:anonymous" cannot get resource "clusterroles" in API group "rbac.authorization.k8s.io" at the cluster scope
View gist:f9aebc275822d158a3d83380e0c8279f
require "bundler"
Bundler.setup(:pre_boot)
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
jsierles / interviews.md
Last active Nov 19, 2018
Interview questions
View interviews.md

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:

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)
end
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;
}
You can’t perform that action at this time.