Skip to content

Instantly share code, notes, and snippets.

cdesch cdesch

Block or report user

Report or block cdesch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CRC8.m
// CRC8.m
// Created by Chris Desch on 2/6/12.
// Translation from
- (int)crc8Checksum:(NSString*)dataFrame{
char j;
int crc8 = 0;
cdesch / touchCorePlot
Created Mar 13, 2012
Core Plot Scatterplot Point size for touch detection
View touchCorePlot
// Create plot and increase size for
CPTScatterPlot *dataSourceLinePlot = [[CPTScatterPlot alloc] init];
dataSourceLinePlot.plotSpace = plotSpace;
dataSourceLinePlot.identifier = colorName;
dataSourceLinePlot.plotSymbolMarginForHitDetection = 10.0f;
cdesch / ObjectiveCSnippets
Created Mar 14, 2012
Useful Objective-C Snippets
View ObjectiveCSnippets
//Deprecating an Item with a define
#define DEPRECATED __attribute__ ((deprecated))
cdesch / gist:2033820
Created Mar 14, 2012
Simple NSDate Components - Easy to break into pieces
View gist:2033820
NSDate *currDate = [NSDate date]; //Current Date
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"dd"];
NSString* myDayString = [NSString stringWithFormat:@"%@", [df stringFromDate:currDate]];
[df setDateFormat:@"MM"]; //MM will give you numeric "03", MMM will give you "Mar"
NSString* myMonthString = [NSString stringWithFormat:@"%@", [df stringFromDate:currDate]];
View gist:2380263
cjs-MacBook-Pro:github cj$ cat cjs-MacBook-Pro:github cj$ brew install homebrew-alt/avr/avr-libc.rb
cat: cjs-MacBook-Pro:github: No such file or directory
cat: cj$: No such file or directory
cat: brew: No such file or directory
cat: install: No such file or directory
require 'formula'
def relative(name)
return name if name.kind_of? Formula
File.join(File.split(__FILE__)[0], name) + '.rb'
cdesch / uart.c
Created May 1, 2012
UART Library
View uart.c
Title: Interrupt UART library with receive/transmit circular buffers
Author: Peter Fleury <>
File: $Id: uart.c,v 2009/11/29 08:56:12 Peter Exp $
Software: AVR-GCC 4.1, AVR Libc 1.4.6 or higher
Hardware: any AVR with built-in UART,
License: GNU General Public License
An interrupt is generated when the UART has finished transmitting or
View ds12B20.c
#include <avr/io.h>
#include <avr/interrupt.h>
#define F_CPU 8000000UL
#include <util/delay.h>
#include <stdlib.h>
#include "ds18b20.h"
View jquery-instantsearch.js
// Instant Search
var re = new RegExp($('#q').val(), 'i')
cdesch /
Created Nov 30, 2012 — forked from erikankrom/
Multiple Profiles for Internal/External Users
from django.db import models
from django.contrib.auth import User
from mycompany.models import Client
from userprofiles.models import Profile
class External(Profile):
#External-specific models
client = models.ForeignKey(Client)
def __unicode__(self):
cdesch / OS X Wiki Server Whitelist
Last active Dec 15, 2015
OS X Wiki Server Whitelist
View OS X Wiki Server Whitelist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
You can’t perform that action at this time.