Skip to content

Instantly share code, notes, and snippets.

@dharmab
dharmab / hotas.md
Last active August 29, 2015 14:04
HOTAS Guide

Entry-level

Logitech Extreme 3D Pro (~$30 new)

This is one of the most prolific flight sticks you can buy. It's incredibly cheap and is a great first step into what's otherwise an expensive hobby. It's not without flaws- the calibration degrades over time and the "throttle" is a flappy piece of plastic, but for less than the cost of an Xbox controller it's a worthy buy.

Thrustmaster HOTAS X (~$45 new)

The Thrustmaster HOTAS X is slightly more expensive than Logitech's offering, but it does come with a large throttle and has better sensors in the flight stick. A great option for "casual" flight games, such as Star Citizen and ArmA 3.

#Subterfuge Game Brief

##What is your project?

Subterfuge is a multiplayer scenario for Arma 3 based on Dark Business and Subrosa. Two Gangster teams are given semi-random objectives that place them in cooperation or opposition. Examples of objectives are "trade your macguffin for the other team's macguffin", "kill the other team", "steal the other team's macguffin and escape with both macguffins" or "team up with the other team to ambush the police team". Each Gangster team is unaware of the other team's objective. An optional third team, the Police team, attempts to prevent the Gangster teams from completing objectives and escaping. The Police team is outnumbered by the Gangster teams but has better equipment. Each round should take between ten and thirty minutes. Players do not respawn until a round is over, but can spectate the game and converse with other dead players while waiting.

##What does your game aim to do?

The purpose of Subterfuge is to be an unpredictable and memorable multiplayer experie

#!/usr/bin/env python
def should_update():
"""
:return: True if the update is required in your environment. False otherwise.
"""
return True
if __name__ == "__main__":
@dharmab
dharmab / inventory
Last active October 27, 2015 15:13
Salt minion bootstrap with Ansible
#!/bin/bash
# Add the SSH fingerprints to the known hosts file
while read minion; do ssh-keyscan -H $minion >> ~/.ssh/known_hosts; done < inventory
# Run the ansible playbook
ansible-playbook --inventory inventory --ask-pass --ask-become-pass playbook.yml
INFO global: Vagrant version: 1.8.1
INFO global: Ruby version: 2.2.3
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_OLD_ENV_DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
INFO global: VAGRANT_OLD_ENV__="/usr/bin/vagrant"
INFO global: VAGRANT_OLD_ENV_PATH="/home/dharmab/.gem/ruby/2.2.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"
INFO global: VAGRANT_OLD_ENV_GDMSESSION="i3"
INFO global: VAGRANT_OLD_ENV_XTERM_LOCALE="en_US.utf8"
INFO global: VAGRANT_OLD_ENV_PWD="/home/dharmab/git/vagrant-ipv6"
# Install Vagrant insecure private key
vagrant_insecure_public_key_url='https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub'
vagrant_insecure_private_key_url="https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant"
public_key=~/.ssh/id_rsa.pub
private_key=~/.ssh/id_rsa
sudo -u vagrant -H /usr/bin/bash -s <<EOF
if [ ! -f $private_key ]; then
curl -s ${vagrant_insecure_private_key_url} -o $private_key;
fi;
if [ ! -f $public_key ]; then
@dharmab
dharmab / decryptr.sh
Created June 29, 2017 20:06
Cryptr microclient
#!/bin/bash
secret_path="$1"
secret_field="$2"
set -e
if [[ -z "$secret_field" ]]; then
secret_field="data"
fi
Calcified Fragments
Curiosity
Verse 1:0
Dearest sisters,
It’s taken me two years — a quarter of our lives — but I’ve found the proof. We aren’t native to the Fundament. Our ancient ancestors came here to hide.
The plate of stone we live on, our Osmium Court, is one fragment of a rocky planet that crashed into the Fundament and broke apart. All the other nearby continents — the Helium Drinkers, the Bone Plaza, the Starcutters — came from the same world.
Perhaps the other races of the Fundament are migrants too.
We live on the shrapnel of our homeworld, floating on an ocean deep inside a gas giant.
That’s what Fundament must be. A titanic gas planet. The endless storm above us must be one layer of the atmosphere. And the sea we float on... there’s more down beneath it. So much more!
You understand what this means, Sathona. The Timid Truth is a lie. We aren’t meant to be the world’s prey. We weren’t born to live and die in the dark.
@dharmab
dharmab / baseline.py
Last active November 9, 2017 05:56
baseline
#!/usr/bin/env python3
from time import sleep
import base64
import pickle
import sys
import zlib
b = "eJydmQe4FcUVgB8CIoJSRLCADgK+R1sEbET0gRCECBqVBFJMMvfu3Lvr3btzd3YvzxtjYnrviYnpPab3ZmJ676b3xPTem6meM3Nm99x733vxy/fxPd6+nfnPmTNnTpm9YebV2cjY9dmMscNHj4yMhLFMdDM76vAYPOwUtUTrEH7KekukuojitJmqPBc11ZSpKLTIO3EaZDMPz4LhqWyrbNbhGfDrvmx29/rs6LHoqMO3VaCN/wskdoq8lxeqLXRD1FWS5CJOC2WSOG2pUEzEOPH/eKFTJRALAtJQhEbJsNFNkp4I47yI03ohZFPGaV6IIlIilKa1QUhRyCQRE1FcKNHQ3bSAEaKTyJ4Kg2xO5BZ6aXYMLHQuLlTA435VjOairY8okGmX1XNyr3L/Z8dGsyI0zTycMQdm+Bfz4QWijsMXq+DFHqUSUEcWsCDR010jajrsjYuDoCFRs+OJtgAmRZ6wEAnnA+EQTg61ApMUooG4JG4p1KqmREeaAq1clLjxUslFhF3MsScg9hLc2xwnGSVk2rMb2aegU3lCpkWOkozKYzLroJQlJOVELmUpSrkIpOzWyBRNVYDNlcy7IFB3rco1hULltEtYRvCTOPxkhG8D+F4JGwTTeqIOvlCAo6AsZ5jpuacQ91TOXe4tXpomV/WuiYsemuauqLuCsKdx7OmIPbvP4iIHRwydjeu6DVuLHj4pUhByJUeegcjl6BtqFHhNjarBupsa/DUQu/AABdkqmroaR2NUoL+vIcqZ+PcN8PeDaMIJqxkclQ5sT6Fhx0BXAQrCCYrbqqSOEnUMFfKotYhaA6gDcZLEOs3BqyDg+AdnrnbJWEeM9ZyxARmn2UWBJriT6ghqYMD5YG/H/eSNNDngkzfh5PXocLHzgryjQIN2tx5Z9XEH0bwYW0rSWUTa