$ xcrun simctl list --json
$ xcrun simctl delete unavailable
| import CoreGraphics | |
| import Accelerate | |
| import CoreImage | |
| import UIKit | |
| extension CGImage { | |
| public enum Error: Swift.Error { | |
| case imageResizingFailed | |
| case cgContextCreationFailed |
| // | |
| // UIImage+Resize.swift | |
| // | |
| // Created by Marcos Griselli on 6/9/17. | |
| // Copyright © 2017 Marcos Griselli. All rights reserved. | |
| // | |
| import Foundation | |
| import UIKit |
// reference: https://stackoverflow.com/a/42705208/1477298
You can do a lot of fun stuff to collection views. I like to subclass UICollectionViewFlowLayout. Here is an example that fades the top and the bottom of the collection view based on distance from center. I could modify it to fade only the very edges but you should figure it after you look through the code.
import UIKit
class FadingLayout: UICollectionViewFlowLayout,UICollectionViewDelegateFlowLayout {
//should be 0<fade<1| #!/usr/bin/env bash | |
| function link_stree { | |
| ln -s /Applications/SourceTree.app/Contents/Resources/stree /usr/local/bin/ | |
| } | |
| function install { | |
| link_stree | |
| } |
| ## Open GitKraken using the current repo directory. | |
| ## For when you want a prettier view of your current repo, | |
| ## but prefer staying in the cli for most things. | |
| ## This will break if GitKraken ever removes the -p flag. | |
| ## If you're not using OSX, the path is definitely different. | |
| kraken () { | |
| ~/Applications/GitKraken.app/Contents/MacOS/GitKraken -p $(pwd) | |
| } |
| <?php | |
| namespace App\Providers; | |
| use App\Extensions\SessionAnonymousGuard; | |
| use Illuminate\Auth\SessionGuard; | |
| use Illuminate\Contracts\Auth\Access\Gate as GateContract; | |
| use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; | |
| class AuthServiceProvider extends ServiceProvider |
A common task when developing iOS apps is to register custom cell subclasses for both UITableView and UICollectionView. Well, that is if you don’t use Storyboards, of course.
Both UITableView and UICollectionView offer a similar API to register custom cell classes:
public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)| * OpenHatch - https://openhatch.org/search/?q=&language=Python | |
| * PyLadies - https://github.com/pyladies | |
| * New Coder - https://github.com/econchick/new-coder | |
| * Django Girls - https://github.com/DjangoGirls | |
| * Matplotlib - https://github.com/matplotlib/matplotlib | |
| * Hylang - http://docs.hylang.org/en/latest/, https://github.com/hylang/hy | |
| * Open Slides (Django) - http://openslides.org/ | |
| * Zeeguu - https://zeeguu.unibe.ch | |
| * Project Jupyter - https://github.com/jupyter | |
| * nbgrader - https://github.com/jupyter/nbgrader |