Skip to content

Instantly share code, notes, and snippets.

Freddy Henin fwhenin

  • Autosoft Inc.
  • United States
View GitHub Profile
View build.sh
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html
View xcode-build-bump.sh
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@fwhenin
fwhenin / KeyValueTableViewCell.swift
Created Jan 6, 2015
Increase the size of the textLabel in UITableViewCellStyle.Value2
View KeyValueTableViewCell.swift
override func layoutSubviews() {
super.layoutSubviews();
var offset = CGFloat(20);
var labelWidth = CGFloat(120);
var space = CGFloat(5);
var labelHeight = CGFloat(21);
var cellHeight = CGFloat(44);
@fwhenin
fwhenin / OrderedDictionary.swift
Created Dec 18, 2014
Swift Ordered Dictionary
View OrderedDictionary.swift
//
// OrderedDictionary.swift
// DMS
//
// Created by Freddy on 12/12/14.
// Copyright (c) 2014 DMSCompany. All rights reserved.
//
import Foundation
View KeychainService.swift
//
// KeychainService.swift
// DMS
//
// Created by Freddy on 10/30/14.
// Copyright (c) 2014 DMSCompany. All rights reserved.
//
import UIKit
import Security
@fwhenin
fwhenin / UDWrapper.swift
Created Dec 18, 2014
NSUserDefaults Wrapper in swift
View UDWrapper.swift
//
// UDWrapper.swift
// DMS
//
// Created by Freddy on 12/18/14.
// Copyright (c) 2014 DMSCompany. All rights reserved.
//
import Foundation
@fwhenin
fwhenin / DDLogWrapper.h
Created Dec 18, 2014
CocoaLumberJack wrapper for Swift
View DDLogWrapper.h
//
// DDLogWrapper.h
// DMS
//
// Created by Freddy on 12/18/14.
// Copyright (c) 2014 DMSCompany. All rights reserved.
//
#import <Foundation/Foundation.h>
@fwhenin
fwhenin / package.json
Last active Aug 29, 2015
Boilerplate package.json
View package.json
{
"name" : "package-name",
"preferGlobal": "true",
"version" : "0.0.1",
"author" : "name <email>",
"description" : "package-description",
"contributors": [
{
"name" : "contributer-name",
@fwhenin
fwhenin / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@fwhenin
fwhenin / HexUIColor.m
Created May 14, 2014
Hex to UIColor Method
View HexUIColor.m
+(UIColor *)convertToUIColorFromHex:(NSString *) hex{
NSScanner *scanner = [NSScanner scannerWithString:hex];
unsigned int baseColor;
[scanner scanHexInt:&baseColor];
CGFloat red = ((baseColor & 0xFF0000) >> 16) / 255.0f;
CGFloat green = (baseColor & 0x00FF00) >> 8) / 255.0f;
CGFloat blue = (baseColor & 0x0000FF)) / 255.0f;
UIColor *color = [UIColor colorWithRed:red green:green blue:blue alpha:1.0f];
You can’t perform that action at this time.