Skip to content

Instantly share code, notes, and snippets.

View cbess's full-sized avatar
💭
Coding for Jesus' glory. Soli Deo gloria

C. Bess cbess

💭
Coding for Jesus' glory. Soli Deo gloria
View GitHub Profile
@cbess
cbess / objc.cfg
Last active December 13, 2015 20:08
My Uncrustify config, based on objc.See comments for installation instructions.
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
@cbess
cbess / activate-constructor-cheats.py
Created April 28, 2013 04:43
Uses python AppleScript to inject cheat codes in Boxer for Mac
# This script will enable cheats within Constructor (via Boxer)
# created by C. Bess - 10/14/2012
#
# - Exec the script while at the player select screen, then in the game press 'C',
# "+" symbol will be shown next to the date when activated.
#
# * = favs
#
# cheats:
# Faster network game - speed471
@cbess
cbess / CBAsyncTestCase.h
Last active December 18, 2015 20:59
Asynchronous Unit Testing - Have your Test Case inherit from it to utilize it - ref: https://gist.github.com/andrewroycarter/2254570 License: BSD 3-Clause
//
// CBAsyncTestCase.h
//
// Created by Christopher Bess
//
#import <SenTestingKit/SenTestingKit.h>
@interface CBAsyncTestCase : SenTestCase
@cbess
cbess / xcode-pods.sh
Created June 28, 2013 14:55
Xcode "Run Script" cocoapods phase
echo Process pods
if [ ! -e /usr/bin/pod ] ; then
echo Installing cocoapods...
gem install cocoapods
fi
pod update
@cbess
cbess / countly.debian.install.sh
Last active September 25, 2019 03:03
# debian count.ly install script
#!/bin/bash
# debian count.ly install script
# by: C. Bess (github.com/cbess), 2013
# Tested on wheezy (v7.1)
set -e
if [[ $EUID -ne 0 ]]; then
echo "Please execute Countly installation script with a superuser..." 1>&2
exit 1
@cbess
cbess / gist:6303604
Last active April 1, 2016 16:59
Fix iOS [sizeWithFont:constrainedToSize:lineBreakMode:] deprecation warning. Adjusts the label height (top align text).
// adjust the label height (top align text)
// old
CGSize labelSize = [model.name sizeWithFont:self.nameLabel.font
constrainedToSize:_maxNameLabelSize
lineBreakMode:self.nameLabel.lineBreakMode];
// new
CGSize labelSize = [model.name boundingRectWithSize:_maxNameLabelSize
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName: self.nameLabel.font}
context:nil].size;
@cbess
cbess / temp-inboxes.md
Last active August 1, 2019 01:52
Temporary inboxes: 10 minute, disposable, temp, etc. email addresses. Live spam free.
@cbess
cbess / sunset-sunrise.md
Last active December 23, 2015 11:00
Sunset/sunrise calculations and libs