This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quickly thrown together, but it works, and maybe it'll get YOU started on | |
# a better solution to the problem. Enjoy! | |
class TextLayout | |
attr_reader :page_width, :tab_width | |
def initialize(tab_width=4, page_width=80) | |
@tab_width, @page_width = tab_width, page_width | |
end | |
# Takes a title and an optional character which will be used |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def play(m) | |
a,c=%w(Rock Scissors Paper),rand(4);[a[c%3],%w(Draw Lose Win)[a.index(m)-c]]*',' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; emacs configuration | |
(push "/usr/local/bin" exec-path) | |
(add-to-list 'load-path "~/.emacs.d") | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
(setq-default tab-width 2) | |
(setq-default indent-tabs-mode nil) | |
(setq inhibit-startup-message t) |
NewerOlder