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
unmap j | |
unmap k | |
unmap d | |
unmap u | |
unmap / | |
unmap gg | |
unmap G | |
unmap t | |
unmap x |
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
NSMutableString *convertedText = [[NSMutableString alloc] initWithCapacity:[text length]]; | |
for (NSUInteger i = 0; i < [text length]; i++) { | |
NSString *character = [text substringWithRange:NSMakeRange(i, 1)]; | |
if (![character canBeConvertedToEncoding:NSASCIIStringEncoding]) { | |
character = @"□"; | |
} | |
[convertedText appendString:character]; | |
} |
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
export PROJECT_DIR=$(pwd) | |
export PROJECT_NAME= # YOUR_PROJECT_NAME | |
source scripts/xclogparser.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
BOLD=$(tput bold) | |
NORMAL=$(tput sgr0) | |
FRAMEWORK_DIRS=$(find . -name '*.framework') | |
for framework in $FRAMEWORK_DIRS; do | |
fname=$(basename $framework .framework) | |
echo $BOLD$framework/$fname$NORMAL | |
nm $framework/$fname | grep UIWeb | |
echo "" | |
done |
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
Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings [-json]] [<buildsetting>=<value>]... [<buildaction>]... | |
xcodebuild [-project <projectname>] -scheme <schemeName> [-destination <destinationspecifier>]... [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings [-json]] [-showdestinations] [<buildsetting>=<value>]... [<buildaction>]... | |
xcodebuild -workspace <workspacename> -scheme <schemeName> [-destination <destinationspecifier>]... [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [-showdestinations] [<buildsetting>=<value>]... [<buildaction>]... | |
xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [-json] [<infoitem>] ] | |
xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]] [-json] | |
xcodebuild -show |
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
for type in AVURLAsset.audiovisualTypes() { | |
if !type.rawValue.hasPrefix("dyn.") { | |
debugPrint("\(type.rawValue)") | |
} | |
} |
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
module.exports.handler = (event, context, callback) => { | |
const headers = { | |
'Access-Control-Allow-Origin': '*', | |
'Access-Control-Allow-Credentials': true | |
}; | |
const invalidResponse = { | |
statusCode: 400, | |
headers, | |
body: JSON.stringify({ error: 'Invalid.' }) | |
}; |
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
# An example for calculation of the crash free rate with Sentry. | |
# This example calculates the crash free rate yesterday. | |
require 'json' | |
require 'net/http' | |
require 'uri' | |
# Set your API Token | |
# https://sentry.io/api/ | |
SENTRY_API_TOKEN = 'xxx' |
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
// To debug, sign out from this app. | |
if let session = Twitter.sharedInstance().sessionStore.session() { | |
Twitter.sharedInstance().sessionStore.logOutUserID(session.userID) | |
} | |
if let session = Twitter.sharedInstance().sessionStore.session() { | |
debugPrint("Session: \(String(describing: session))") | |
debugPrint("Existing: \(Twitter.sharedInstance().sessionStore.existingUserSessions())") | |
tweet() | |
} else { |
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 | |
remote="$1" | |
url="$2" | |
z40=0000000000000000000000000000000000000000 | |
while read local_ref local_sha remote_ref remote_sha | |
do | |
if [ "$local_sha" = $z40 ] |
NewerOlder