Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aranair
aranair / github-context.json
Created July 12, 2022 15:22 — forked from colbyfayock/github-context.json
Sample payload for Github Action `github` context
{
"token": "[token]",
"job": "notifySlack",
"ref": "refs/pull/4/merge",
"sha": "[shad]",
"repository": "colbyfayock/demo-github-actions",
"repository_owner": "colbyfayock",
"repositoryUrl": "git://github.com/colbyfayock/demo-github-actions.git",
"run_id": 120667610,
"run_number": "2",
@aranair
aranair / FB-PE-InterviewTips.md
Created April 5, 2021 14:14 — forked from ameenkhan07/FB-PE-InterviewTips.md
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting

@aranair
aranair / self-signed-certificate-with-custom-ca.md
Last active October 21, 2020 20:13 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@aranair
aranair / docx2pdf.sh
Created December 10, 2018 15:05
LibreOffice to convert Word .doc/x files to PDF
#!/bin/bash
#
# Use LibreOffice to convert Word .doc/x files to PDF in the current,
# or relative directory location, unless --outdir option used (see below).
# Tested: macOS Sierra 10.12.3
# Version: 1.2
# VikingOSX, 2017-02-02, Apple Support Communities
# https://discussions.apple.com/thread/7848497
#
Usage () {
@aranair
aranair / prepare_dashboard.sh
Last active March 2, 2020 16:23
Prepares exported Grafana JSON to be loaded by Prometheus Operator -> Grafana Watcher
# !/bin/bash
#
# Usage:
# 1. Copy the JSON from Grafana -> Export as JSON -> Clipboard
# 2. ./prepare_dashboard.sh new_dashboard_xxx
# - This will create new_dashboard_xxx-dashboard.json
#
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@aranair
aranair / strace->s3 uploader
Created September 28, 2017 17:57
strace s3 uploader
#!/bin/bash
while true; do
YEAR=`date +%Y`
MONTH=`date +%m`
DAY=`date +%d`
HOUR=`date +%H`
MINUTE=`date +%M`
ARR=$(pidof "Passenger NodeApp: /srv/factory" | tr " " "\n")

Keybase proof

I hereby claim:

  • I am aranair on github.
  • I am aranair (https://keybase.io/aranair) on keybase.
  • I have a public key whose fingerprint is AB63 5704 AEE9 3D67 88CF 1260 BFCD 4DDE 5E06 7455

To claim this, I am signing this object:

@aranair
aranair / capybara cheat sheet
Created July 26, 2016 09:15 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '5.0.0'
gem 'pg'
@aranair
aranair / 25712
Created July 13, 2016 09:13
25712
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '4.2.6'