This file contains 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 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 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 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 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 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 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 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) | |
} |
This file contains 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 Foundation | |
import ImageIO | |
func datesFromImagesInDir(dir: String) -> [NSDate] { | |
let fm = NSFileManager.defaultManager() | |
var error: NSError? | |
let df = NSDateFormatter() | |
df.dateFormat = "yyyy:MM:dd HH:mm:ss" |
This file contains 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
- (NSManagedObjectContext *)managedObjectContext { | |
if (! _managedObjectContext) { | |
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"Moviedo" withExtension:@"momd"]; | |
NSManagedObjectModel *managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; | |
_managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; | |
_managedObjectContext.persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:managedObjectModel]; | |
NSURL *storeURL = [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject] URLByAppendingPathComponent:@"Moviedo.sqlite"]; | |
NSDictionary *options = @{ |