Skip to content

Instantly share code, notes, and snippets.

@NeverAgain11
NeverAgain11 / PagingCollectionViewController.swift
Created July 13, 2023 12:03 — forked from michaelevensen/PagingCollectionViewController.swift
An example of perfectly paging horizontal UICollectionViewController with overflowing cells. Works great with Storyboard — no need to set any specific attributes, just add this Class to the Controller and set your desired size for the cells like you would normally.
import UIKit
private let reuseIdentifier = "Cell"
class CollectionViewController: UICollectionViewController {
/* Custom scrollView for paging */
let pagingScrollView = UIScrollView()
/* Return item size */
@NeverAgain11
NeverAgain11 / make-git-use-sublime.markdown
Created February 15, 2023 03:50 — forked from geekmanager/make-git-use-sublime.markdown
Making git use Sublime Text for rebase etc

Making git use Sublime Text

First up, let's make Sublime Text 2 available from the command line in terminal, by creating a link to subl which is the launcher from terminal:

ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime

(added bonus of this approach is when you upgrade to ST3 or change text editor, you can just redirect the symlink).

If there's any chance that bash doesn't check usr/local/bin then use [Launch Sublime Text 2 from Mac OSX Terminal] for more detailed instructions on how to make this happen.

@NeverAgain11
NeverAgain11 / UIView.swift
Last active April 18, 2019 07:56
UIView extension
//
// UIView.swift
// Common
//
// Created by lsc on 27/02/2017.
//
//
import UIKit