Skip to content

Instantly share code, notes, and snippets.

View ariporad's full-sized avatar

Ari Porad ariporad

View GitHub Profile
@ariporad
ariporad / zero-downtime-deploy.sh
Created May 6, 2016 04:36
Rover DevOps Challenge Solution
if [[ $# -eq 0 ]] ; then
echo 'Usage: $0 VERSION'
echo ''
echo 'Does a Zero-Downtime deploy of VERSION to worker, web-1 and web-2, including DB migrations.'
echo ''
exit 0
fi
ssh root@worker "./materialize $1 && ./db-migrate $1 && ./restart-worker"
ssh root@web-1 "./lb-remove && ./materialize $1 && ./db-migrate $1 && ./restart-web && ./lb-join"
@ariporad
ariporad / tweettactoe.js
Created June 1, 2016 22:49
Tweet Tac Toe
'use strict';
const Twitter = require('twitter');
const TicTacToe = require('tictactoe-agent');
const USERNAME = 'USERNAME';
const client = new Twitter({
consumer_key: 'TWITTER CONSUMER KEY',
consumer_secret: 'TWITTER CONSUMER SECRET',
access_token_key: 'TWITTER ACCESS TOKEN',
@ariporad
ariporad / .bashrc
Created March 15, 2021 17:10
QEASim CLI Helpers
# Add this to your .bashrc or .zshrc
export MATLAB="/Applications/MATLAB_R2020a.app" # You'll need to update this to match your install of MATLAB
export MATLAB_CLI="$MATLAB/bin/matlab"
alias matlab="$MATLAB_CLI -nodesktop -nosplash"
function qeasim() {
# The above alias wasn't working in this function
$MATLAB_CLI -nodesktop -nosplash -nojvm -r "qeasim $*"
}
@ariporad
ariporad / Instructions.md
Created January 23, 2022 18:58
SoftDes Setup Instructions for MacOS

SoftDes Setup Instructions for MacOS

So, you'd like to use a Mac for SoftDes? Welcome to the civilized world! This guide will tell you how to do it. These instructions will work for either Intel or Apple Silicon/M1 Macs.

Here's how it works: Unlike Windows, macOS is Unix on the inside. (Unix and Linux are, for the sake of this class, interchangeable.) So instead of juggling Linux/Ubuntu inside Windows, macOS can serve the role of both.

Warning: Do this at your own risk. Windows 10 on an Olin Laptop is the only officially supported platform for SoftDes. This is simply from my experimentation.

You'll want to have the normal setup instructions open too. They have lots of good information and explaination (most of which doesn't change for Mac). In particular, all of the "check" stages are the same.