Skip to content

Instantly share code, notes, and snippets.

View Kymer's full-sized avatar
🔥
On fire (send help)

Kymer Kymer

🔥
On fire (send help)
View GitHub Profile
@Kymer
Kymer / PagingCollectionViewController.swift
Created October 7, 2018 16:16 — 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 */
$ ssh <user>@<mac-without-screen>
$ sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist
/System/Library/LaunchDaemons/com.apple.screensharing.plist: Service is disabled
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
@Kymer
Kymer / xcode_duplicate_instructions.txt
Last active April 17, 2018 06:57 — forked from emotality/duplicate_line_xcode.md
Xcode duplicate line binding.
1. Open plist: `open /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist`
3. Add the text of 'xcode_duplicate_key.txt' to this file
4. Go to Xcode preferences -> Key Bindings -> Text tab -> Scroll till you see Duplication
5. Click on Duplicate Current Line, add a shortcut for it, eg. Cmnd+D (resolve any duplicate bindings)
6. Open Xcode