Skip to content

Instantly share code, notes, and snippets.

View domgetter's full-sized avatar

Dominic Muller domgetter

View GitHub Profile
@domgetter
domgetter / RPNCalculator.java
Created October 12, 2017 23:42 — forked from StephenBerkner/RPN Calculator
Reverse Polish Notation Calculator Written in Java
import java.util.*;
public class RPNCalc {
private static Stack<Integer> stack = new Stack<Integer>();
private static Scanner input = new Scanner(System.in);
public static void calculator() throws Exception {
System.out.println("Welcome to the RPN Calculator program!");
@domgetter
domgetter / install-tmux
Last active March 15, 2016 01:13 — forked from rothgar/install-tmux
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
def state
case
when !collected? then 'booked'
when !ironed? then 'collected'
when !delivered? then 'ironed'
else 'delivered'
end
end
@domgetter
domgetter / excpetions.rb
Last active December 29, 2015 19:48 — forked from bodgix/excpetions.rb
begin # start catching exceptions here
ldap = Net::LDAP.open(
:host => host,
:port => port,
:auth => {
:method => :simple,
:username => CONFIG['repldn'],
:password => CONFIG['replpw']
}
)
module Auspice
class BottomFeeder
attr_accessor :x, :y, :z, :in, :out
def initialize(size,w,h)
@font = Gosu::Font.new(size,:name => DAT+'ttfs/ATComputer.ttf')
@rows = ((h / size)+size)
@cols = (w / @font.text_width('_',1))
@size = size
@dtext = ['']
require 'io/console'
Kernel.load('Auspice/Auspice.rb')
module Auspice
class SplashScreen
def initialize
@win = Screen.new
#@sin = Gosu::Image.new(@win, Surface.new(64,64,[100,100,100,100]),false)
@words = BottomFeeder.new 24,800,400
#@gl = OpenGLInjection.new
#@win.addent(@gl)
@domgetter
domgetter / roadmap
Last active August 29, 2015 14:21 — forked from odaba/roadmap
I don't have a good name for it yet, webstorage git?
I want it to be kinda up-and-running for v0.1, so major sections are omitted intentionally.
basics:
config: object: key/val -> preference/state
{ 'branchname': 'master' }
tags: object: key/val -> tagname/(commit/tree/blob)hash
{ 'head': '' }
directory: object: key/val -> fullpathfilename/contents
{}
@domgetter
domgetter / git_objects.rb
Last active February 17, 2019 14:14 — forked from anonymous/git_blob.rb
An implementation of different objects in the object store of Git
require 'digest/sha1'
require 'zlib'
require 'pp'
module Git
OBJECTS = {}
class Object

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

def random_consonant
([*"b".."z"] - ["e", "i", "o", "u"]).sample
end