Skip to content

Instantly share code, notes, and snippets.

@mammothbane
mammothbane / woodo.c
Last active August 29, 2015 14:10
sudo woodo
#include <unistd.h>
#include <stdio.h>
int main(int argc, char **argv) {
uid_t uid = geteuid();
if (uid) {
printf("It's a weird tree.\n");
} else {
printf(" _ __\n");
printf(" / `\\ (~._ ./ )\n");
@mammothbane
mammothbane / defines.lua
Created December 18, 2014 04:34
Europa Universalis IV modified defines file (common/defines.lua) - remove colonial nations
NDefines = {
NGame = {
START_DATE = "1444.11.11",
END_DATE = "1821.1.2",
MAX_RANDOM_NEW_WORLD = "1492.1.1"
},
NDiplomacy = {
MAX_CLIENT_STATES = 10, -- Max client states for one country
@mammothbane
mammothbane / guess.py
Created August 30, 2015 11:57
mmr guesser for DotA 2, based on /u/Erolon's original java implementation
__author__ = 'mammothbane'
import sys
import requests
from bs4 import BeautifulSoup
import logging
logging.basicConfig(level=logging.DEBUG, filename='guess.log')
dotabuff_url = 'http://www.dotabuff.com/players/'
for x in range(1, len(sys.argv)):
@mammothbane
mammothbane / MyList.java
Last active December 12, 2015 05:48
successful List<E> implementation in half an hour
import java.util.*;
public class MyList<E> implements List<E> {
public boolean add(E e) {
throw new UnsupportedOperationException();
}
public void add(int index, E element) {
throw new UnsupportedOperationException();
}

Keybase proof

I hereby claim:

  • I am mammothbane on github.
  • I am mammothbane (https://keybase.io/mammothbane) on keybase.
  • I have a public key whose fingerprint is 0AA0 EACF 1CA6 18FF 9FA3 A4F7 5DEB 682B 2F05 7E33

To claim this, I am signing this object:

@mammothbane
mammothbane / jet.py
Created April 1, 2017 04:32
approximate flight parameters for an iron man-like jet suit
from bokeh.plotting import figure, output_file, show
from numpy import sqrt, sin, arctan2
import scipy.integrate as integrate
import numpy as np
import pint
"""
This script approximates the flight range and speed of a jet-powered Iron Man-
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 13,
// font family with optional fallbacks
fontFamily: 'Consolas, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
{
"name": "heist",
"parameters": {
"target": [
"magic item",
"person (rescue/capture)",
"weapon",
"piece of art",
"reverse heist: plant an object",
{
"name": "heist",
"parameters": {
"target": [
"magic item",
"person (rescue/capture)",
"weapon",
"piece of art",
"reverse heist: plant an object",
Host hadoop_name
HostName 34.207.74.173
User ubuntu
IdentityFile ~/.ssh/hadoopkey.pem
Host hadoop_data1
HostName 54.89.92.59
User ubuntu
IdentityFile ~/.ssh/hadoopkey.pem