Skip to content

Instantly share code, notes, and snippets.

@bleeckerj
bleeckerj / xcode-build-bump.sh
Created December 11, 2017 16:18 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# 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)
@bleeckerj
bleeckerj / .gitignore
Created December 6, 2017 22:27 — forked from pholas/.gitignore
.gitignore for Xcode 8 and Swift 3
## OS X files
.DS_Store
.DS_Store?
.Trashes
.Spotlight-V100
*.swp
## Xcode build files
DerivedData/
build/
@bleeckerj
bleeckerj / uiimage_combine.swift
Created November 25, 2017 15:55 — forked from A-Zak/uiimage_combine.swift
UIImage extension to combine two images
extension UIImage {
class func imageByCombiningImage(firstImage: UIImage, withImage secondImage: UIImage) -> UIImage {
let newImageWidth = max(firstImage.size.width, secondImage.size.width )
let newImageHeight = max(firstImage.size.height, secondImage.size.height)
let newImageSize = CGSize(width : newImageWidth, height: newImageHeight)
UIGraphicsBeginImageContextWithOptions(newImageSize, false, UIScreen.mainScreen().scale)
@bleeckerj
bleeckerj / toastr.fontawesome.css
Created November 6, 2017 03:41 — forked from askehansen/toastr.fontawesome.css
toastr fontawesome
#toast-container > .toast {
background-image: none !important;
}
#toast-container > .toast:before {
position: fixed;
font-family: FontAwesome;
font-size: 24px;
line-height: 18px;
float: left;
@bleeckerj
bleeckerj / Sequence+Helpers.swift
Created July 22, 2017 00:15 — forked from khanlou/Swift2.swift
`any`, `all`, `none`, `first`, and `count` on SequenceType in Swift
extension Sequence {
func any(_ predicate: (Self.Iterator.Element) throws -> Bool) rethrows -> Bool {
for element in self {
let result = try predicate(element)
if result {
return true
}
}
return false
@bleeckerj
bleeckerj / .bash_profile
Created May 20, 2017 17:18 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@bleeckerj
bleeckerj / gist:e68a893a6dbf0b02d18de2bd0f12ce84
Created April 17, 2017 00:45 — forked from diederikh/gist:7c9862750040951497ce
Transition to view controller within container view (called in performForSegue:)
- (void)switchToViewController:(UIViewController *)viewController
{
UIViewController *currentViewController = self.childViewControllers[0];
[self addChildViewController:viewController];
[self transitionFromViewController:currentViewController toViewController:viewController duration:0.2 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{}
completion:^(BOOL finished) {
[currentViewController removeFromParentViewController];
[self.containerView addSubview:viewController.view];
}];
}
@bleeckerj
bleeckerj / git-ignore-all
Created April 12, 2017 14:36 — forked from crittelmeyer/git-ignore-all
Shell script that adds all untracked files to .gitignore
#!/bin/bash -e
git status -s | grep -e "^??" | cut -c 4- >> .gitignore
@bleeckerj
bleeckerj / ViewController.swift
Created April 5, 2017 16:05 — forked from huguesbr/ViewController.swift
Sample RxBluetoothKit implementation
import UIKit
import CoreBluetooth
import RxSwift
import RxBluetoothKit
extension CBUUID {
var type: UUID {
return UUID(rawValue: uuidString)!
}
@bleeckerj
bleeckerj / .gitignore
Created March 21, 2017 12:57
.gitignore for Xcode 7.x and Swift 2.x
#########################
# .gitignore file for Xcode 7 Source Projects
# can be used for watchOS, tvOS, iOS, OSX, Swift development
#
# February 2016
#
# Save this file as .gitignore in your repository's working directly.
# Note: Don't confuse the working directory with the .git directory. It will not work if you put it there.
#
#####