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
find . -name '*.DS_Store' -type f -delete |
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
alias rmdsstores='find ./ -type f | grep .DS_Store | xargs rm' |
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
access_token = CAAB2dKc4ZCMEBAAn2vCajKjEJUK5DGQ2urcUIij2wtLbvg6fmbUmEQW4YKxj5QZAemDyx8yLXKyLlZBcZBAeUMIhFUzmul8G45k5h0hBZCu3R07tCZC4QZBQRElACOKYh48CDUodIA4P7t4HITHvwgZC | |
{ error: | |
{ message: 'An unknown error has occurred.', | |
type: 'OAuthException', | |
code: 1 } } | |
JSON Stringify: {"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1}} | |
POST /announce 500 452ms - 486 | |
{ meal: 'http://nodescrumptious.azurewebsites.net/meals/cheeseburger', | |
place: '361771023937832', | |
tags: '510683132', |
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
Bundle params = new Bundle(); | |
params.putString( "fields", "fields=id,username,name,first_name,last_name,picture" ); | |
final Request request = new Request( Session.getActiveSession(), "me", params, HttpMethod.GET, new Request.Callback() { | |
@Override | |
public void onCompleted(Response response) { | |
Log.d( "FacebookConnect", "FacebookConnect > retrieveUserData responds: " + response.toString() ); | |
Log.d( "FacebookConnect", "FacebookConnect > retrieveUserData graphObject: " + response.getGraphObject() ); | |
Log.d( "FacebookConnect", "FacebookConnect > retrieveUserData graphObjectList: " + response.getGraphObjectList() ); | |
} |
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
GENERATE PUBLIC/PRIVATE KEY PAIR: | |
For PHP: | |
openssl genrsa > drmsign.pem | |
openssl rsa -in drmsign.pem -pubout > drmsign.pub | |
Then convert to DER (required by Java): | |
http://codeartisan.blogspot.sg/2009/05/public-key-cryptography-in-java.html | |
openssl pkcs8 -topk8 -inform PEM -outform DER -in drmsign.pem -out drmsign.der -nocrypt | |
openssl rsa -in drmsign.pem -pubout -outform DER -out drmsign_pub.der |
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
using UnityEditor; | |
using UnityEditor.Callbacks; | |
public class AutoSerialiseAssets : Editor { | |
[PostProcessScene(-2)] | |
public static void OnPostprocessScene() { | |
EditorApplication.SaveAssets(); | |
} | |
} |
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 diff --no-prefix --ignore-space-at-eol | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" > changes.patch |
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
Getting Apple's receipt in iOS 8 onwards: | |
NSURL *receiptUrl = [[NSBundle mainBundle] appStoreReceiptURL]; | |
NSData *receiptData = [NSData dataWithContentsOfURL:receiptUrl]; | |
// receiptData = [GTMBase64 encodeData:receiptData]; | |
// NSString *receiptString = [[NSString alloc] initWithData:receiptData encoding:NSUTF8StringEncoding]; | |
NSString *receiptString = [receiptData base64EncodedStringWithOptions:0]; | |
NSString *appleJson = [NSString stringWithFormat:@"{ \"receipt-data\" : \"%@\" }", receiptString]; | |
NSLog(@"%@", appleJson); | |
The receipt: |
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
How to merge two repos together | |
https://stackoverflow.com/a/1684694/474330 | |
How to add non-standard svn-branch to git-svn: | |
https://stackoverflow.com/questions/13376917/add-git-branch-after-initial-fetch-in-the-same-svn-remote | |
There's actually another way to achieve the same. It involves some manipulations with internal git-svn files though. | |
You can just add necessary branch to .git/config and update .git/svn/.metadata file, so the latest fetched revision becomes 0: | |
git-svn switch svn url: | |
https://www.freelancingdigest.com/articles/git-svn-switch-to-a-different-a-svn-url/ |
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 DIRECTORY in */; | |
do | |
pushd "${DIRECTORY}" | |
echo "${DIRECTORY}" >> ../git-remote.txt | |
echo "===================================================================" >> ../git-remote.txt | |
git remote -v >> ../git-remote.txt | |
echo "-------------------------------------------------------------------" >> ../git-remote.txt | |
git log -1 >> ../git-remote.txt | |
popd | |
done |
OlderNewer