Skip to content

Instantly share code, notes, and snippets.

View i8degrees's full-sized avatar

Jeffrey Carpenter i8degrees

View GitHub Profile
@i8degrees
i8degrees / gist:5643148
Created May 24, 2013 12:25
GameState && SDLInput Interfaces
class SDLInput
{
virtual void Input ( SDL_Event *input )
{
// while ( SDL_PollEvent ( input ) )
switch ( input->type )
{
case SDL_KEYDOWN:
onKeyDown ( input->key.keysym.sym, input->key.keysym.mod );
break;
[
{
"ID" : 1,
"Level" : 1,
"Type" : 1,
"Element" : 0,
"Name" : "Geezard",
"ID" : 2,
"Level" : 1,
"Type" : 1,
@i8degrees
i8degrees / example.cpp
Last active December 18, 2015 02:29
Abstracted SDL_Drawables Example
namespace nom
{
class SDL_Drawable
{
public:
virtual void Draw ( SDL_Surface *video_buffer ) const = 0;
};
// Canvas
// Image
/*
* Filename: platform.cpp
* Comments:
* Defines functions that are to be used on specific platforms.
*/
#ifdef __APPLE__
#include "CoreFoundation/CoreFoundation.h"
#include <iostream>
#endif
@i8degrees
i8degrees / github_i8degrees.sh
Created August 9, 2013 01:27
GeekTools script
#!/bin/sh
# 2012-05/01:jeff
#
# Geeklet (GeekTools / OSX)
#
# Github Feed for i8degrees
#
URL="https://github.com/i8degrees.atom"
@i8degrees
i8degrees / logstat.sh
Created August 9, 2013 01:28
GeekTools script
#!/usr/bin/env /bin/sh
# 2012-07/11:jeff
#
# logstat.sh
#
# ...
#
echo "\t\tnas0.syn.localnet:"
ssh -t admin@nas0.syn.localnet 'sudo /sbin/mdadm -D /dev/md2|grep -e "Array Size" -e "Used Dev Size" -e "/dev"'
@i8degrees
i8degrees / test0.json
Created October 5, 2013 15:27
sample data for Boost::PropertyTree
[
{
"ID" : 1,
"Name" : "Geezard",
"Level" : 1,
"Type" : 1,
"Element" : 0,
"Ranks" : [ 1, 4, 5, 1 ]
},
{
@i8degrees
i8degrees / mplayer.rb
Created October 26, 2013 08:55
Fix OS X v10.9 compiling of mplayer homebrew package
require 'formula'
class Mplayer < Formula
homepage 'http://www.mplayerhq.hu/'
url 'http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.tar.xz'
sha1 '913a4bbeab7cbb515c2f43ad39bc83071b2efd75'
head 'svn://svn.mplayerhq.hu/mplayer/trunk', :using => StrictSubversionDownloadStrategy
option 'with-x', 'Build with X11 support'
@i8degrees
i8degrees / mplayer.rb
Last active December 26, 2015 23:59
Fix compile of mplayer brew formula on OS X Mavericks v10.9
diff --git i/Library/Formula/mplayer.rb w/Library/Formula/mplayer.rb
index 369b640..f7a1fa0 100644
--- i/Library/Formula/mplayer.rb
+++ w/Library/Formula/mplayer.rb
@@ -28,9 +28,18 @@ class Mplayer < Formula
end unless MacOS.prefer_64_bit?
def patches
- # When building SVN, configure prompts the user to pull FFmpeg from git.
- # Don't do that.
@i8degrees
i8degrees / nomdev.sublime-build
Last active December 31, 2015 09:19
Sublime Text 2 Build System for nomdev.rb
{
// nomdev.rb expects and needs to be executed from a project's root directory
"working_dir": "${project_path}",
// At the bare minimum, we need the executable paths to:
// a) Ruby v1.9.x interpreter; b) nomdev.rb; c) CMake v2.6.x+;
// d) build tools (make, clang, etc.)
"path": "${HOME}/Projects/nomdev.git:${HOME}/local/bin:/usr/local/bin:/usr/bin",
// Default build (Command + B)
"cmd": [ "nomdev.rb build --threads 6; nomdev.rb install" ],
// We need shell access in order to execute our build