Skip to content

Instantly share code, notes, and snippets.

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@cameron
cameron / docker-ssl-cert-generate
Last active February 2, 2023 10:09
Generate self-signed SSL certs for docker client <— HTTPS —> daemon
#! /bin/bash
# HEADS UP! Make sure to use '*' or a valid hostname for the FDQN prompt
echo 01 > ca.srl
openssl genrsa -des3 -out ca-key.pem
openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem
openssl genrsa -des3 -out server-key.pem
openssl req -new -key server-key.pem -out server.csr
@yujiod
yujiod / keenio_collector.rb
Created March 9, 2014 01:18
Clone Keen IO data to Elasticsearch
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require "net/https"
require "uri"
require "json"
require "time"
KEENIO_PROJECT_ID = "XXXXXXXX"
KEENIO_READ_KEY = "YYYYYYYY"
# Ruby Thread Pool
# ================
# A thread pool is useful when you wish to do some work in a thread, but do
# not know how much work you will be doing in advance. Spawning one thread
# for each task is potentially expensive, as threads are not free.
#
# In this case, it might be more beneficial to start a predefined set of
# threads and then hand off work to them as it becomes available. This is
# the pure essence of what a thread pool is: an array of threads, all just
# waiting to do some work for you!
@virtualstaticvoid
virtualstaticvoid / Backup and download database backup
Created January 19, 2012 15:27
Automate Heroku database backups
#!/bin/bash
#
# Script to create and download a database backup on Heroku
# Written by Chris Stefano (https://github.com/virtualstaticvoid)
#
# See http://devcenter.heroku.com/articles/pgbackups for details
#
appname=$1
filename=${appname}_db_$(date +%Y%m%d)_$(date +%H%M).pg_backup