Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dedmons on github.
  • I am dedmons (https://keybase.io/dedmons) on keybase.
  • I have a public key ASBgJLVBzxkz0QV3ix5ltCQu2g4Nun1e7x23JaSUW7SNVAo

To claim this, I am signing this object:

@dedmons
dedmons / gist:5633032
Created May 23, 2013 06:06
vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 22 2013 15:53:03)
MacOS X (unix) version
Included patches: 1-923
Compiled by dedmons@Douglass-MacBook-Air.local
Huge version without GUI. Features included (+) or not (-):
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
@dedmons
dedmons / copyright
Created May 15, 2013 16:51
Best copyright ever
@dedmons
dedmons / Makefile
Last active December 11, 2015 06:29
My make file for CPSC 412 - 2D Game Development
# Created by DJ Edmonson
# dedmons@g.clemson.edu
# Warnings frequently signal eventual errors:
CXXFLAGS=`sdl-config --cflags` -g -W -Wall -Weffc++ -Wextra -pedantic -O0
# Linker flags for both OS X and Linux
LDFLAGS = `sdl-config --libs` -lSDL_ttf -lSDL_image -lSDL_gfx -lexpat
# Generates list of object files from all the
# source files in directory
@dedmons
dedmons / cu-cpsc-functions.zsh
Created January 17, 2013 14:06
This is a collection of functions to make connecting to Clemson's School of Computing lab machines easier. To use, add the functions into your shell rc file or login file, or source the file containing the functions. Then type the name of the function followed by the machine number and if you are off campus type remote also, e.x. dragon 5 will c…
# Created by Douglas "DJ" Edmonson
function dragon() {
min=1
max=24
if [[ $1 -lt $min || $1 -gt $max ]]
then
echo "Machine Number "$1" is not correct"
echo "There are only "$0$min" through "$0$max
return
@dedmons
dedmons / LoggerPlus.h
Created December 29, 2012 03:16
Improved Logging macros for Objective-C Development. These are modified versions of the solutions here: http://stackoverflow.com/questions/969130/how-to-print-out-the-method-name-and-line-number-and-conditionally-disable-nslog To disable DLog and ULog just a property or method to a class named dontLog
#ifdef DEBUG
# define DLog(fmt, ...) if(![self respondsToSelector:@selector(dontLog)]) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
#ifdef DEBUG
# define ULog(fmt, ...) if(![self respondsToSelector:@selector(dontLog)]) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"%s\n [Line %d] ", __PRETTY_FUNCTION__, __LINE__] message:[NSString stringWithFormat:fmt, ##__VA_ARGS__] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; }
#else
# define ULog(...)
@dedmons
dedmons / gist:3873145
Created October 11, 2012 15:15
Turn TODO, FIXME, ???, and !!! into warnings in Xcode
Add a run shell build phase for the project and paste this script in:
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"
@dedmons
dedmons / gist:3782320
Created September 25, 2012 14:39
Setup CocoaPods
1: Install Xcode command line tools
set Xcode path if needed (xcode-path --switch /Applications/Xcode.app/Contents/Developer)
2: sudo gem update --system
3: sudo gem install cocoapods
4: pod setup