Skip to content

Instantly share code, notes, and snippets.

View yamamushi's full-sized avatar

Will Navidson yamamushi

View GitHub Profile
@yamamushi
yamamushi / bbsterm.rb
Created October 14, 2012 05:00 — forked from erikh/bbsterm.rb
require 'rubygems'
require 'eventmachine'
module Telnet
# :stopdoc:
IAC = 255.chr # "\377" # "\xff" # interpret as command
DONT = 254.chr # "\376" # "\xfe" # you are not to use option
DO = 253.chr # "\375" # "\xfd" # please, you use option
WONT = 252.chr # "\374" # "\xfc" # I won't use option
WILL = 251.chr # "\373" # "\xfb" # I will use option
***INITIALIZATION***
1. We assume this starts with some "God" CA that has a publicly trusted certificate. This is the root of the entire system.
2. God CA signs "Alice" certificate, authorizing Alice to act as a market player. Alice is assigned 100u of currency.
3. God CA signs "Bob" certificate, authorizing Bob to act as a market player. Bob is assigned 100u of currency.
4. God CA signs "Charlie" certificate, authorizing Charlie to act as a market player. Charlie is assigned 100u of currency.
***1st MARKET ACTIONS***
1. "Alice" signs "Anna" and gifts "anna" 25u. To sign anna, alice requires signatures of two witnesses.
a. Alice asks Bob and pays Bob a fee of 50% of the transaction (12.5u).
b. Alice asks Charlie and pays Charlie a fee of 50% of the transaction (12.5u).
@yamamushi
yamamushi / gist:5823402
Created June 20, 2013 14:50
Int to UTF-8 String function (C++)
//
// IntToUTF8String.cpp
// The ASCII Project
//
// Created by Yamamushi on 6/20/13.
// Copyright (c) 2013 TAP. All rights reserved.
//
#include <string>
@yamamushi
yamamushi / bresenham3d
Created June 20, 2013 15:03
C++ Bresenham 3d Line Drawing Algorithm
// Bresenham3D
//
// A slightly modified version of the source found at
// http://www.ict.griffith.edu.au/anthony/info/graphics/bresenham.procs
// Provided by Anthony Thyssen, though he does not take credit for the original implementation
//
// It is highly likely that the original Author was Bob Pendelton, as referenced here
//
// ftp://ftp.isc.org/pub/usenet/comp.sources.unix/volume26/line3d
//
#include <boost/any.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/fusion/include/std_pair.hpp>
#include <vector>
#include <map>
#include <iostream>
namespace json {
#!/bin/sh -xe
API_KEY="YOUR_API_KEY_GOES_HERE"
FPS="10"
VLC_PATH="/Applications/VLC.app/Contents/MacOS/VLC"
# I don't know how this'll behave on multimon, so you might want to hard-code.
# INRES='1440x900'
INRES=$(osascript -e 'tell application "Finder" to get bounds of window of desktop'|sed 's/, /x/g'|cut -f3- -dx)
OUTRES='1280x800'
# You can change this to record microphone or something else, from man soxformat (under coreaudio):
@yamamushi
yamamushi / gist:9357101
Last active September 11, 2021 04:55
Int to UTF-8 C++
//
// IntToUTF8String.cpp
// Created by Jonathan Rumion on 3/4/13.
// Copyright (c) 2014.
//
// Consider this BSD licensed for all intents and purposes
// You are free to modify and use this as you wish without
// Attribution (though it would be appreciated it is not necessary).
//
@yamamushi
yamamushi / keybase.md
Created April 9, 2014 02:11
keybase.md

Keybase proof

I hereby claim:

  • I am yamamushi on github.
  • I am yamamushi (https://keybase.io/yamamushi) on keybase.
  • I have a public key whose fingerprint is 6682 0389 C1FD B417 9D05 3BAD 8821 91F6 6E1D AA32

To claim this, I am signing this object:

@yamamushi
yamamushi / makefile-osx
Created June 17, 2014 06:34
OSX Makefile for libtcod
# libtcod makefile
# to build debug version, run "make -f makefile-linux debug"
# to build release version, run "make -f makefile-linux release"
SRCDIR=src
INCDIR=include
#dependencies
# SDL
SDL_FLAGS=`sdl-config --cflags`
SDL_LIBS=`sdl-config --libs`
@yamamushi
yamamushi / gist:dd7e7f5791ce497e68a4
Created May 19, 2015 00:47
Setting up a modern C++ development environment on Linux with Clang and Emacs
This was mirrored from the snapshot of earthserver.com available on archive.org
--------------------------------------------------------------------------------
Setting up a modern C++ development environment on Linux with Clang and Emacs
I am an independent game developer and this is my personal wiki.
Please feel free to email hello@earthserver.com, and to follow @Earthserver
(Redirected from Setting up a C++11 development environment on Linux with Clang and Emacs)