Skip to content

Instantly share code, notes, and snippets.

View CarterA's full-sized avatar

Carter Allen CarterA

View GitHub Profile
@CarterA
CarterA / Common Application Essay.md
Created December 22, 2012 20:53
My main essay for the Common Application.

** Prompt: A range of academic interests, personal perspectives, and life experiences adds much to the educational mix. Given your personal background, describe an experience that illustrates what you would bring to the diversity in a college community, or an encounter that demonstrated the importance of diversity to you. **

I began working on the Community College of Denver’s (CCD) balloon satellite project in the Fall of 2011. It was the first time that a student team from CCD would participate in one of the Colorado Space Grant Consortium’s (COSGC) main events: launching experiments on a high-altitude balloon satellite. Each participating school was given a budget of money and mass to build payloads that would be carried up to 100,000 feet into the atmosphere by a helium-latex balloon. Our first attempt was rushed, but we learned what to focus on in future experiments. Our next payload in the Spring of 2012 was a success; we collected viable scientific data, all of which would be useful in the next semest

@CarterA
CarterA / NSObject+OP6AssociatedObjects.h
Created August 8, 2012 23:42
Objective-C Associated Objects, Subscripting Edition
//
// NSObject+OP6AssociatedObjects.h
//
// Created by Carter Allen on 8/8/12.
// Copyright (c) 2012 Opt-6 Products, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSObject (OP6AssociatedObjects)
(root source.arduino
## Basics
# Standard classes
(zone arduino.standard.support.class
(match
(regex [\b(EEPROM|Serial|EthernetServer|EthernetClient|EthernetUDP|Firmata|LiquidCrystal|SD|Servo|SPI|SoftwareSerial|Stepper|Wire)\b])
)
)
@CarterA
CarterA / Brute Force Primality Test.c
Created January 10, 2012 06:26
Primality Testing and Factorization in C
int bruteForcePrimalityTest(long int n) {
for (long int i = 2; i < n; i++) {
if (n % i == 0) return 0;
}
return 1;
}
@CarterA
CarterA / main.c
Created December 21, 2011 01:00
FizzBuzz
//
// main.c
// FizzBuzz
//
// Created by Carter Allen on 12/20/11.
// Copyright (c) 2011 Opt-6 Products, LLC. All rights reserved.
//
#include <stdio.h>
// Create and fill a buffer for with the raw markdown data.
struct sd_callbacks callbacks;
struct html_renderopt options;
const char *rawMarkdown = [markdownContent cStringUsingEncoding:NSUTF8StringEncoding];
struct buf *inputBuffer = bufnew(strlen(rawMarkdown));
bufputs(inputBuffer, rawMarkdown);
// Parse the markdown into a new buffer using Sundown.
struct buf *outputBuffer = bufnew(64);
sdhtml_renderer(&callbacks, &options, 0);
@CarterA
CarterA / borderRadius.css
Created October 2, 2011 20:50
About This Website
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
behavior: url(/stylesheets/PIE.htc);
@CarterA
CarterA / printHeader.rb
Created October 2, 2011 20:40
Streamlined Yardwork
require "term/ansicolor"
include Term::ANSIColor
def printHeader headerText
print bold + blue + "==> " + reset
print bold + headerText + reset + "\n"
end
@CarterA
CarterA / gist:1257903
Created October 2, 2011 20:36
Ridiculous Optimization
(function(){if(!/*@cc_on!@*/0)return;var e="abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(',');for(var i=0;i< e.length;i++){document.createElement(e[i]);}})();
@CarterA
CarterA / gist:1257894
Created October 2, 2011 20:32
Better Singletons in Objective-C
@implementation Singleton
+ (Singleton *)sharedInstance {
static Singleton *globalInstance;
static dispatch_once_t predicate;
dispatch_once(&predicate, ^{
globalInstance = [[self alloc] init];
});
return globalInstance;
}