Skip to content

Instantly share code, notes, and snippets.

View marrs's full-sized avatar

David Marrs marrs

View GitHub Profile
@jdmartin
jdmartin / bsdgames-osx.rb
Last active April 30, 2023 04:12 — forked from ctdk/bsdgames-osx.rb
A homebrew formula for installing bsdgames-osx (updated for macOS Sierra). For now, just plunk it into /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/bsdgames-osx.rb (or, put it in ~/.homebrew/Library/Formula/ and specify this path when installing) and run "brew install bsdgames-osx". Tested successfully with MacOS X 10.12.3.
require 'formula'
class BsdgamesOsx < Formula
desc 'The classic bsdgames of yore for Mac OS X and macOS.'
homepage 'https://github.com/ctdk/bsdgames-osx'
url 'https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz'
sha256 '699bb294f2c431b9729320f73c7fcd9dcf4226216c15137bb81f7da157bed2a9'
head 'https://github.com/ctdk/bsdgames-osx.git'
version '2.19.3'
depends_on "bsdmake" => ':build'
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@guns
guns / clojure-slam-hound.vim
Created August 3, 2013 01:47
Example function and mapping for running slamhound on the current file
" Require fireplace.vim
function! s:ClojureSlamHound(file)
if &modified
echom "Buffer contains unsaved changes!"
return 1
endif
call fireplace#session_eval(
\ '(clojure.core/require (quote slam.hound) (quote clojure.pprint))'
\ . '(let [file (clojure.java.io/file "' . a:file . '")]'
\ . ' (binding [clojure.pprint/*print-right-margin* ' . &textwidth . ']'