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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
RAlt::RCtrl | |
LAlt::LCtrl | |
LCtrl::LWin | |
RCtrl::RAlt |
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
// | |
// main.m | |
// Unsused Import Finder | |
// | |
// Created by Mojtaba Cazi on 6/27/17. | |
// Copyright © 2017 CaziSoft, LLC. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
# first you need a new empty branch; let's call it `newroot` | |
git checkout --orphan newroot | |
git rm -rf . | |
# then you apply the same steps | |
git commit --allow-empty -m 'root commit' | |
git rebase --onto newroot --root master | |
git branch -d newroot |
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
@interface ViewController () <UITableViewDelegate, UITableViewDataSource, NSFetchedResultsControllerDelegate> | |
@property (nonatomic, weak) IBOutlet UITableView *tableView; | |
@property (nonatomic, strong) NSFetchedResultsController *fetchController; | |
@end | |
@implementation ViewController |
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
CGPoint desiredContentOffset = <#content offset#>; | |
CGRect scrollBounds = scrollView.bounds; | |
scrollBounds.origin = desiredContentOffset; | |
scrollView.bounds = scrollBounds; |
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
#if DEBUG | |
# define TICK NSDate *startTime = [NSDate date] | |
# define TOCK(_TXT_) NSLog(@"%@ Time: %f", _TXT_, -[startTime timeIntervalSinceNow]) | |
#else | |
# error Debug Only. | |
#endif |
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
1. Project Settings | build settings -> Enabele Bitcode => NO | |
2. Add following to `-info.plist` | |
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSAllowsArbitraryLoads</key> | |
<true/> | |
</dict> | |
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
{ | |
"aps": { | |
"badge": 10, | |
"alert": "Hello world!", | |
"sound": "cat.caf" | |
} | |
} |
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
if [ -z "${PROJECT_DIR}" ]; then | |
PROJECT_DIR=`pwd` | |
fi | |
if [ -z "${PREFIX}" ]; then | |
PREFIX="" | |
fi | |
SVN_DIR="${PROJECT_DIR}/.svn" | |
GIT_DIR="${PROJECT_DIR}/.git" |
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
/* | |
Source: http://stackoverflow.com/a/14047028/1017340 | |
*/ | |
#define BUFSIZE 128 | |
char buf[BUFSIZE]; | |
char *pIn, *pOut, *pEnd; | |
char full; | |
// init |
NewerOlder