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
- (void)keyboardWasShown:(NSNotification *)notification { | |
CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; | |
// Screen size | |
CGSize screenSize = [[UIApplication sharedApplication] delegate].window.frame.size; | |
// Viewport size | |
CGFloat viewportHeight = screenSize.height - keyboardSize.height; | |
} |
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
javascript:(function(d){els=d.querySelectorAll('*');for(i=0;i<els.length;i++){e=els[i];e.style.color='transparent';e.style.backgroundImage='none';if(e.nodeName=='IMG')e.style.visibility='hidden';}})(document); |
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
// | |
// AccountsViewController.h | |
// | |
// Created by Nico Hämäläinen on 28/03/14. | |
// | |
#import <UIKit/UIKit.h> | |
@interface AccountsViewController : UIViewController |
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
NSFileManager *fileManager = [NSFileManager defaultManager]; | |
NSArray *contents = [fileManager contentsOfDirectoryAtPath:directoryPath error:NULL]; | |
NSEnumerator *e = [contents objectEnumerator]; | |
NSString *filename; | |
while ((filename = [e nextObject])) { | |
NSString *filePath = [directoryPath stringByAppendingPathComponent:filename]; | |
if ([[filePath pathExtension] isEqualToString:@"jpg"]) { | |
// jpegitz |
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
// Splitter view recognizer should only begin if we're truly touching something inside the splitter view | |
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer | |
{ | |
if (gestureRecognizer == _splitterPanRecognizer) { | |
CGPoint location = [gestureRecognizer locationInView:self.view]; | |
BOOL didHitView = NO; | |
NSArray *hitTestViews = @[_splitterView]; | |
hitTestViews = [hitTestViews arrayByAddingObjectsFromArray:_splitterView.subviews]; |
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/Foundation.h> | |
@interface IOSTools : NSObject | |
- (NSString *)getCountry; | |
@end |
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
reduce( | |
emailAddressField.textDynamic(), | |
passwordField.textDynamic(), | |
confirmPasswordField.textDynamic(), | |
false) { email, password, confirm in | |
return email != "" && password != "" && confirm != "" && password == confirm | |
} ->> signupButton |
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
// Grab API instance | |
let API = APIClient.instance | |
// Attempt to authenticate with username and password | |
let Authentication = API.authenticate(username, password: password) | |
Authentication.onSuccess { user in | |
println("Logged in as \(user.userName!)!") | |
// Load user images after a successful sign-in | |
let UserImages = API.imagesForUserId(user.id!, nextToken: nil) |
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
// Brawl Tests | |
import * as Brawl from "./brawl" | |
// Create a new match | |
let match = new Brawl.Match(); | |
// Enter some players | |
let friendly = new Brawl.Player("Friendly", match); | |
let opposing = new Brawl.Player("Opposing", match); |
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
# Git | |
alias gs='git status' | |
alias go='git checkout' | |
alias gadd='git add -p' | |
alias gi='git commit' | |
alias gd='git diff' | |
alias gb='git branch' | |
alias gl='git log' |
OlderNewer