Skip to content

Instantly share code, notes, and snippets.

View jrahme-cci's full-sized avatar

Jacob Rahme jrahme-cci

  • CircleCI
  • Ottawa, Ontario, Canada
View GitHub Profile
@jrahme-cci
jrahme-cci / ImportCert.ps1
Created April 22, 2020 19:14
A script to load certificates for windows builds
param(
[Parameter(Mandatory=$True, Position=0, ValueFromPipeline=$false)]
[System.String]
$KeyPath,
[Parameter(Mandatory=$True, Position=1, ValueFromPipeline=$false)]
[System.String]
$KeyPass
)
$Cert = Import-PfxCertificate -FilePath $KeyPath -Password (ConvertTo-SecureString -String "$KeyPass" -AsPlainText -Force) -CertStoreLocation Cert:\LocalMachine\My
@jrahme-cci
jrahme-cci / theivery
Last active April 14, 2020 00:56
a script to get hidden vars from a cci pipeline for demo purposes
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import os
s = smtplib.SMTP(host="smtp.gmail.com", port=587)
s.starttls()
s.ehlo()
s.login("afakeemailforaccidemo@gmail.com", os.environ["EMAILPASSWORD"])
@jrahme-cci
jrahme-cci / simple-server
Last active April 14, 2020 00:17
a simple python server
from http.server import HTTPServer, BaseHTTPRequestHandler
from io import BytesIO
from time import time
PORT = 5253
FILENAME = "h4ck3d_v4rs"
class Handler(BaseHTTPRequestHandler):

Keybase proof

I hereby claim:

  • I am jrahme-cci on github.
  • I am jrahme_cci (https://keybase.io/jrahme_cci) on keybase.
  • I have a public key whose fingerprint is 3CD6 D41E 367B 4DFB BE54 398C DFFD 9039 2078 CBD5

To claim this, I am signing this object:

This scenario is a more hypothetical one but is representative of a situation that could occur at CircleCI.

You’ve just come online and have taken over the on-call shift for a service, VM-scheduler. This service is responsible for starting and maintaining customers’ VMs through the entire VM lifecycle. It is running on a cloud provider and uses two distinct regions to spin up VMs for customer jobs to run on. A page comes in, “VM-Scheduler: High VM boot failure rate” A graph is included in the alert that shows a sharp increase in boot failures over the last five minutes.

Similar to the last scenario, you have access to your laptop, and your expected monitoring and observability toolsets. This scenario occurs during a regular work week, but just after regular working hours.

You are part of a “build-it-and-run-it” application team responsible for a fairly traditional web application. There is an HTTP load balancer, a backend application server, and a database server.

You receive a report from a support engineer that a customer has said the website is slow.

As in the previous scenario you have access to your laptop, and expected monitoring and observability tool suites.

This scenario occurs during regular working hours, in the middle of the week.

What do you do next?

@jrahme-cci
jrahme-cci / Scenario 1 - CYAI.md
Last active September 7, 2021 18:13
The first scenario for a choose your own adventure interview

You are on-call for a service named “http-router”, a simple HTTP router service. It’s sole purpose in life is to take requests from a front-end web application and pass them to backend services named “order-service” and “return-service”. You are on call for the “http-router”, the other services are managed by other teams at the company.

While sitting on your sofa during a lovely holiday weekend and listening to music, you are interrupted by the sounds of your phone telling you that you’ve received a text message. It’s an alert saying “http-router: unable to reach order-service (STATUS: 500)”. It’s now time to turn off the gramophone and face a different kind of music.

For this scenario you have access to your laptop, and expected monitoring tool suite. This scenario occurs during a long weekend, in the evening