This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| extension UIContentSizeCategory { | |
| var multiplier: CGFloat { | |
| switch self { | |
| case .accessibilityExtraExtraExtraLarge: return 23 / 16 | |
| case .accessibilityExtraExtraLarge: return 22 / 16 | |
| case .accessibilityExtraLarge: return 21 / 16 | |
| case .accessibilityLarge: return 20 / 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // KeyboardTransition.swift | |
| // ViewControllerKeyboardAnimated | |
| // | |
| // Created by Ryan Nystrom on 11/7/17. | |
| // Copyright © 2017 Ryan Nystrom. All rights reserved. | |
| // | |
| import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "actor": { | |
| "avatar_url": "https://avatars.githubusercontent.com/u/10810283?", | |
| "display_login": "direwolf-github", | |
| "gravatar_id": "", | |
| "id": 10810283, | |
| "login": "direwolf-github", | |
| "url": "https://api.github.com/users/direwolf-github" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (lldb) po [IGListDebugger dump] | |
| IGListAdapter 0x7ff4c0933100: | |
| Updater type: IGListAdapterUpdater | |
| Data source: <IGTestDelegateDataSource: 0x7ff4c0916ee0> | |
| Collection view delegate: (null) | |
| Scroll view delegate: (null) | |
| Is in update block: No | |
| View controller: (null) | |
| Registered cell classes: | |
| {( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Lines configured by zsh-newuser-install | |
| HISTFILE=~/.histfile | |
| HISTSIZE=1000 | |
| SAVEHIST=10000 | |
| bindkey -v | |
| # End of lines configured by zsh-newuser-install | |
| fpath=(/usr/local/share/zsh-completions $fpath) | |
| # The following lines were added by compinstall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // iterate newResultsArray in ascending order | |
| // if na[i] == oa[j] and na[i+1] == oa[j+1], assign them to the opposite index+1 | |
| // pass 4 is for ascending and 5 descending, block covers logic for both | |
| void (^pass4And5Block)(BOOL, vector<IGListRecord>&, vector<IGListRecord>&) = ^(BOOL ascending, vector<IGListRecord> &newResults, vector<IGListRecord> &oldResults) { | |
| const NSInteger offset = ascending ? 1 : -1; | |
| for (NSInteger i = ascending ? 0 : newCount - 1; | |
| (ascending && i < newCount - 1) || (!ascending && i > 0); | |
| ascending ? i++ : i--) { | |
| // don't check block moves for new elements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // iterate newResultsArray in ascending order | |
| // if na[i] == oa[j] and na[i+1] == oa[j+1], assign them to the opposite index+1 | |
| // pass 4 is for ascending and 5 descending, block covers logic for both | |
| void (^pass4And5Block)(BOOL, vector<IGListRecord>&, vector<IGListRecord>&) = ^(BOOL ascending, vector<IGListRecord> &newResults, vector<IGListRecord> &oldResults) { | |
| const NSInteger offset = ascending ? 1 : -1; | |
| for (NSInteger i = ascending ? 0 : newCount - 1; | |
| (ascending && i < newCount - 1) || (!ascending && i > 0); | |
| ascending ? i++ : i--) { | |
| // don't check block moves for new elements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // RN3DTouchGestureRecognizer.swift | |
| // | |
| // Created by Ryan Nystrom on 10/10/15. | |
| // Copyright © 2015 Ryan Nystrom. All rights reserved. | |
| // | |
| import UIKit.UIGestureRecognizerSubclass | |
| class RN3DTouchGestureRecognizer: UIGestureRecognizer { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Example usage | |
| # cd into directory that has @3x images | |
| # ./whatever-you-name-this.sh | |
| # Remember to chmod +x the script | |
| resize () { | |
| ls *@3x.png | awk '{print("convert "$1" -filter box -resize '$1' "$1)}' | sed 's/@3x/'$2'/2' | /bin/sh | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func showScheme(sender: ScalingPageControl) { | |
| performSegueWithIdentifier(SegueIdentifier.PresentSchemeSegue.rawValue/* :( */, sender: pageControl) | |
| } |