View gist:f6274288e829a9821a115019fcc6674f
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
Fix for source tree commit information window gone: | |
defaults delete com.torusknot.SourceTreeNotMAS "NSSplitView Subview Frames repowindow_LogViewDescSplitter" | |
https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-how-to-show-commit-information-panel/qaq-p/245922 |
View backup-git-repos.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
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 |
View git_important_links
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/ |
View ios_receipt_verify_the_curl_command
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: |
View gitdiff-svnpatch.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
git diff --no-prefix --ignore-space-at-eol | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" > changes.patch |
View gist:dfe0fdfbd8f7de6f0af7
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(); | |
} | |
} |
View openssl_genrsa
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 |
View Facebook SDK Android Graph API Request
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() ); | |
} |
View gist:5693636
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', |
View gist:4489778
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' |
NewerOlder