Skip to content

Instantly share code, notes, and snippets.

View i8degrees's full-sized avatar

Jeffrey Carpenter i8degrees

View GitHub Profile
@i8degrees
i8degrees / Makefile (OSX).sublime-build
Created March 14, 2013 18:35
~/Library/Application Support/Sublime Text 2/Packages/User
{
"cmd": ["make"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${project_path:${folder:${file_path}}}",
"selector": "source.makefile",
"path": "/usr/bin:/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin",
"variants":
[
{
@i8degrees
i8degrees / card.h
Last active December 15, 2015 20:29
Final Draft of TTcards Card Objects Design
class Card
{
unsigned int id;
unsigned int level; // 1..10
unsigned int type;
unsigned int element;
unsigned int power[4]; // clockwise; top, right, down, left
std::string name;
// Card ( id, level, type, element, power[], name );
@i8degrees
i8degrees / .bashlib_timecap
Created April 9, 2013 12:47
timecap() mod
# Derives from Fielding's dotfiles repo
# https://github.com/justfielding/dotfiles
timecap () {
filenumber=${1:-1}
delay=${2:-5}
scdir=${3:-./}
date_bin=$(which date)
screencap_bin="$(which screencapture)"
i=$filenumber
while [ 1 ]
class DrawableObject
{
public:
virtual void Draw(GraphicalDrawingBoard&) const = 0; //draw to GraphicalDrawingBoard
};
class Triangle : public DrawableObject
{
public:
void Draw(GraphicalDrawingBoard&) const; //draw a triangle
@i8degrees
i8degrees / CMakeLists.txt
Created May 5, 2013 21:56
elle CMake Build Script
cmake_minimum_required ( VERSION 2.6 )
set ( CMAKE_VERBOSE_MAKEFILE true )
set ( CMAKE_BUILD_TYPE Debug )
#set ( BUILD_SHARED_LIBS true )
#set ( CMAKE_OSX_ARCHITECTURES i386;x86_64 ) # OSX Universal Library
set ( CMAKE_CXX_COMPILER "/usr/bin/clang++" )
set ( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++" )
set ( CMAKE_CXX_FLAGS_DEBUG "-gfull -O0 -Wall" )
@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"