Skip to content

Instantly share code, notes, and snippets.

View g0ld2k's full-sized avatar

Chris Golding g0ld2k

View GitHub Profile
@g0ld2k
g0ld2k / center-collection-view.swift
Last active June 17, 2016 11:45
Centers Collection View Content
extension CommunityConnectViewController: UICollectionViewDelegateFlowLayout {
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAtIndex section: Int) -> UIEdgeInsets {
// Translated from Objective-C version at: http://stackoverflow.com/a/27656363/309736
let cellCount = CGFloat(viewModel.getNumOfItemsInSection(0))
if cellCount > 0 {
let flowLayout = collectionViewLayout as! UICollectionViewFlowLayout
@g0ld2k
g0ld2k / .bash_profile
Created January 19, 2016 18:31 — 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