Skip to content

Instantly share code, notes, and snippets.

View marknorgren's full-sized avatar

Mark Norgren marknorgren

View GitHub Profile
/* fir.c
* SEIS742 - May2010
*/
#include <math.h>
//#include <filter.h>
#include "normal.h"
#include "flat.h"
#include "tachy.h"
#include "defib.h"
#include <stdio.h>
@marknorgren
marknorgren / ir2.py
Created October 6, 2011 17:48
SEIS731 Homework3
import re, math
# Debug flag: True=print intermediate data structures
DEBUG = True
# hardcoded (for simplicity) tuple of documents to index
documents = ('D1.txt','D2.txt','D3.txt')
index={} # dictionary key: (document, term), value: frequencies/weights
maxterm={} # dictionary key: document, value: maximum number of time any term appears
@marknorgren
marknorgren / xcode-git-version.sh
Created January 23, 2012 23:12 — forked from jpwatts/xcode-git-version.sh
This Xcode 4 build phase script automatically sets the version and short version string of an application bundle based on information from the containing Git repository.
#!/bin/bash
# This script automatically sets the version and short version string of
# an Xcode project from the Git repository containing the project.
#
# To use this script in Xcode 4, add the contents to a "Run Script" build
# phase for your application target.
set -o errexit
set -o nounset
@marknorgren
marknorgren / transform.cpp
Created February 29, 2012 05:14
transform.cpp
/*
*Skeleton transform program
* SEIS750
* Spring 2012
**/
#include <GL/Angel.h>
#include <math.h>
#pragma comment(lib, "glew32.lib")
@marknorgren
marknorgren / launch_steps.rb
Created April 10, 2012 17:21
launch_steps.rb
def app_path
ENV['APP_BUNDLE_PATH'] || (defined?(APP_BUNDLE_PATH) && APP_BUNDLE_PATH)
end
Given /^I launch the app$/ do
# latest sdk and iphone by default
launch_app app_path
end
Given /^I launch the app using iOS (\d\.\d)$/ do |sdk|
@marknorgren
marknorgren / cleanup.sh
Created April 18, 2012 19:39
Panacea for slow Xcode
#!/bin/sh
for f in $(ls -p ~/Library/Application\ Support/iPhone\ Simulator/| grep '/') ; do
if [ "$f" != 'User/' ]; then
echo "$f"
rm -r ~/Library/Application\ Support/iPhone\ Simulator/$f
mkdir ~/Library/Application\ Support/iPhone\ Simulator/$f
fi
done
rm -r ~/Library/Developer/Xcode/DerivedData
@marknorgren
marknorgren / MRKOpenGLView.m
Created April 29, 2012 22:26
openGL ES 2.0 VAO VBO setup
//
// MRKOpenGLView.m
// openGL_Example
//
// Created by Mark Norgren on 4/17/12.
// Copyright (c) 2012 Marked Systems. All rights reserved.
//
#import "MRKOpenGLView.h"
#import "CC3GLMatrix.h"
@marknorgren
marknorgren / objectAdresses.m
Created May 4, 2012 18:23
Printing out addresses of objects
NSNumber *currentCounter = appDelegate.newsCount;
DLog(@"currentCount Address: %p", currentCounter);
DLog(@"newsCount Address: %p", (appDelegate.newsCount));
DLog(@"currentCount Value: %@", currentCounter);
DLog(@"newsCount value: %@", appDelegate.newsCount);
DLog(@"currentCounter: %@", currentCounter);
DLog(@"%@<%x>", currentCounter, &*currentCounter);
DLog(@"%@<%x>", currentCounter, &currentCounter);
@marknorgren
marknorgren / OpenGLView.m
Created May 5, 2012 21:31
SEIS 750 Final Project - OutForADrive - iOS
//
// OpenGLView.m
// HelloOpenGL
//
// Created by Ray Wenderlich on 5/24/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "OpenGLView.h"
#import "CC3GLMatrix.h"
@marknorgren
marknorgren / remoteRepoAdd
Created August 3, 2012 16:28
add remote repo
#Setting up a public repository
##In the remote location create a bare repo:
git init bare
##In the local repo, add remote reference
git remote add ‘nameOfRemote’ ‘URL to remote’ //note if this is default remote use ‘origin’ for name
##Push your new local repo to this remote
git push --all