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!
\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install QEMU OSX port with ARM support | |
sudo port install qemu +target_arm | |
export QEMU=$(which qemu-system-arm) | |
# Dowload kernel and export location | |
curl -OL \ | |
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie | |
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie | |
# Download filesystem and export location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will help you setup Docker for TLS authentication. | |
# Run it passing in the arguement for the FQDN of your docker server | |
# | |
# For example: | |
# ./create-docker-tls.sh myhost.docker.com | |
# | |
# The script will also create a profile.d (if it exists) entry | |
# which configures your docker client to use TLS | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Generates client and server certificates used to enable HTTPS | |
# remote authentication to a Docker daemon. | |
# | |
# See http://docs.docker.com/articles/https/ | |
# | |
# To start the Docker Daemon: | |
# | |
# sudo docker -d \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/tasks/db.rake | |
namespace :db do | |
desc "Dumps the database to db/APP_NAME.dump" | |
task :dump => :environment do | |
cmd = nil | |
with_config do |app, host, db, user| | |
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
end | |
puts cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var redis = require("redis") | |
, subscriber = redis.createClient() | |
, publisher = redis.createClient(); | |
subscriber.on("message", function(channel, message) { | |
console.log("Message '" + message + "' on channel '" + channel + "' arrived!") | |
}); | |
subscriber.subscribe("test"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/ | |
git clone git://github.com/wbond/sublime_package_control.git Package\ Control | |
cd Package\ Control | |
git checkout python3 | |
# restart Sublime Text 3 and you should have Package Control working |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bindata' | |
class CustomProtocol < BinData::Record | |
endian :big | |
stringz :command_word | |
uint8 :op1 | |
uint8 :op2 | |
end |
NewerOlder