Skip to content

Instantly share code, notes, and snippets.

View jkubicek's full-sized avatar

Jim Kubicek jkubicek

View GitHub Profile
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
#!/bin/bash
# Create Git Repository
# created by Jim Kubicek, 2009
# jimkubicek@gmail.com
# http://jimkubicek.com
# DESCRIPTION
# Create remote git repository from existing project
# this script needs to be run from within the project directory
@jkubicek
jkubicek / Numbers Current Time.scpt
Created April 8, 2011 23:22
Paste the current time into the currently selected Numbers.app cell
tell application "Numbers"
set current_cell to cell 0 of selection range of table 0 of sheet 0 of document 0
set value of current_cell to (current date) as string
end tell
@jkubicek
jkubicek / AdHoc_Deployment.sh
Created April 19, 2011 10:59
Bash script to automate app deployment. Sets the updates the version numbers, sets a tag in git
#!/bin/sh
# AdHocDeployment.sh
# Newsgroup
#
# Created by Jim Kubicek on 4/1/11.
# Copyright 2011 jimkubicek.com. All rights reserved.
# Update version number
agvtool next-version -all
@jkubicek
jkubicek / HelpfulMacros.h
Created April 19, 2011 21:48
Generally helpful macros I like to include in all my projects
//
// HelpfulMacros.h
//
// Created by Jim Kubicek on 4/19/11.
// Copyright 2011 Jim Kubicek. All rights reserved.
//
// Logging
// Based on code from http://cocoaheads.byu.edu/node/6
@jkubicek
jkubicek / gist:1503874
Created December 20, 2011 23:59
Have CodeRunner use clang for compilation
Open "/Users/<UserName>/Library/Application Support/CodeRunner/Languages/5/compile.sh"
Change this line:
gcc "$1" -o "$compname" -finput-charset=${enc[$2]} -ObjC $3
to
clang "$1" -o "$compname" -finput-charset=${enc[$2]} -ObjC $3
@jkubicek
jkubicek / gist:1503941
Created December 21, 2011 00:24
Lorem ipsum generator for Obj-C
#import <Foundation/Foundation.h>
#define DEBUG
//#undef DEBUG
//>>>>> snip
#ifdef DEBUG
static inline NSString * GenerateLorumStringCharCount(NSUInteger count)
{
NSString *lorum = @"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ";
@jkubicek
jkubicek / .vimrc
Created January 7, 2012 04:48
My .vimrc
set nocompatible " choose no compatibility with legacy vi
syntax enable
set encoding=utf-8
set showcmd " display incomplete commands
filetype plugin indent on " load file type plugins + indentation
set relativenumber " line numbers start from 0 at current line
"" Whitespace
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4)
@jkubicek
jkubicek / build and deploy
Created February 7, 2012 15:59
iOS build script
#!/bin/sh
WORKSPACE="$(pwd)/XXXXX.xcodeproj/project.xcworkspace"
CONFIG="Release"
SCHEME="Release"
SDK="iphoneos5.0"
TARGET="XXXXX"
BUILDDIR="$(pwd)/build/Release-iphoneos"
APPNAME="XXXXX"
DEVELOPER_NAME="iPhone Distribution: XXXXX"