Skip to content

Instantly share code, notes, and snippets.

@osteslag
osteslag / IR_Black.dvtcolortheme
Created February 20, 2011 10:54
IR_Black theme for Xcode 4, based on IR_Black for Xcode 3 by David Zhou, based on IR_Black for TextMate by Todd Werth. See links in comments below.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.811765 0.796078 0.564706 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Inconsolata - 16.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
// File Name : Nanode_MAC.c
// UNIO_memory , ATmega family , C language , bit-bang method.
// Dependencies :
// Processor : ATmega328
// Hardware : Nanode 5
// Debug Module :
// I.D.E. : Arduino
// Company : Arbour Wood Ltd
// Author : Ken Boak
// File Name : c_msp_uni_05.c
// UNIO_memory , MSP430 family , C language , bit-bang method.
// Dependencies : msp430x12xx.h
// Processor : MSP430F1232
// Hardware : MicroChip's UNIO EEPROM = 11XXX on Softbaugh EVB .
// Debug Module : MSP-FET430UIF - Texas Instruments
// I.D.E. : IAR
// Company : MicroChip Technology , Inc.
// Author : Alexandru Valeanu
//...........................................................................
@threebytesfull
threebytesfull / Nanode_MAC.pde
Created June 11, 2011 20:56
Sample code to read the MAC address on a Nanode V5.
// Nanode_MAC
// Rufus Cable, June 2011 (threebytesfull)
// Sample code to read the MAC address from the 11AA02E48 on the
// back of the Nanode V5 board.
// This code is hacky and basic - it doesn't check for bus errors
// and will probably fail horribly if it's interrupted. It's best
// run in setup() - fetch the MAC address once and keep it. After
// the address is fetched, it puts the chip back in standby mode
@osteslag
osteslag / version.sh
Created July 18, 2011 12:45
Script for managing build and version numbers using git and agvtool. See link in comments below.
#!/bin/sh
# Script for managing build and version numbers using git and agvtool.
# Change log:
# v1.0 18-Jul-11 First public release.
# v1.1 29-Sep-12 Launch git, agvtool via xcrun.
version() {
@pjlsergeant
pjlsergeant / gist:1803656
Created February 11, 2012 19:07
Game of Life in 131 characters of Perl.
#!perl
use strict;
# Accepts a grid size, and a list representing the grid. 131
# characters. RUNS UNDER STRICTURES BABY YEAH.
my$life=sub{$a=shift;map{$b=$_[$_];my$n;$n+=$_[$_]for($_-$a-1..$_-$a+1,$_-1,$_+1,$_+$a-1..$_+$a+1);$n+$b==3||$b&&$n==4||0}0..$#_};
my $result = join '', $life->( 5, qw/
package Roman;
use Moose;
sub AUTOLOAD {
our $AUTOLOAD;
(my $digits = $AUTOLOAD) =~ s/.+:://g;
$digits =~ s/$_->[0]/$_->[1]/
for
[ IV => 'IIII' ],
@c0diq
c0diq / gist:2213492
Created March 27, 2012 07:02
Automatic CFBundleVersion increment Build Pre-Action Scheme
#!/bin/bash
if [[ $CONFIGURATION == *Adhoc* ]]; then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${PROJECT_DIR}/${INFOPLIST_FILE})
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" ${PROJECT_DIR}/${INFOPLIST_FILE}
fi
@c0diq
c0diq / Xcode4HockeyAppTestFlightintegration.sh
Created March 27, 2012 07:13
Automatic TestFlight/HockeyApp Upload XCode Script
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
# Inspired by original script by incanus:
# https://gist.github.com/1186990
#
# Rewritten by martijnthe:
# https://gist.github.com/1379127
#
@chizmw
chizmw / cmd_availability.pl
Created July 24, 2012 11:06
irssi 'availability' plugin script
#!/usr/bin/env perl
# Usage: /AVAILABILITY [here|lunch|meeting]
sub cmd_availability {
# data - contains the parameters for /HELLO
# server - the active server in window
# witem - the active window item (eg. channel, query)
# or undef if the window is empty
my ($data, $server, $witem) = @_;