Skip to content

Instantly share code, notes, and snippets.

View hwrdprkns's full-sized avatar
💭
I may be slow to respond.

Taylor H. Perkins hwrdprkns

💭
I may be slow to respond.
View GitHub Profile
if (DEBUG) Log.v(TAG, "this slide allowed " + allowed);
st://A1cCgpwEdU8DTwaCoAHIgBaPLu1aN5HmKjkoLsglEXFwihcFQkI0VTOKYQCKQQdkZWZhdWx0iqIeU3BvcnRzLCBXb3JsZFdpZGUgRnVuLCBHZW5lcmFs
@hwrdprkns
hwrdprkns / gist:2974301
Created June 22, 2012 18:11
Broken javascript
function getSuggestions(text, callback){
var rdioBaseURL = "http://api.rdio.com/1/";
var content_type = "application/x-www-form-urlencoded";
var types = "Artist";
var params = new HashTable();
var params['body'] = {"method":"searchSuggestions", "query":text, "types":types};
var params['method'] = 'POST';
var params['headers'] = {"Content-Type":content_type};
oauth.sendSignedRequest(rdioBaseURL,callback,params);
};
@hwrdprkns
hwrdprkns / Fragment.java
Created January 4, 2012 19:38
picasaProblems
mPicasaService = new PicasawebService("myAppName");
mPicasaService.setUserToken(PreferenceManager.getDefaultSharedPreferences(getActivity()).getString("authtoken",""));
AsyncTask<Void,AlbumEntry,UserFeed> loadAlbumTask = new AsyncTask<Void,AlbumEntry,UserFeed>(){
@Override
protected UserFeed doInBackground(Void... params) {
try {
@hwrdprkns
hwrdprkns / dabbutHax.js
Created November 14, 2011 07:44 — forked from erikformella/dabbutHax.js
dick move
/*
USAGE:
copy and paste all of this into the javascript console. you can then call falseVote(ians_comment_id, times) to upvote
ian as partygoer times times. you can also provide your own comment_id by doing an inspect element on the voting div
on anyone's profile.
the ajax requests are synchronous to allow for the coockie bs. this makes the execution seem slow for large times.
i wonder how long it takes to run it for thousands of iterations...
*/
@hwrdprkns
hwrdprkns / errorLog.txt
Created August 8, 2011 14:39
Apple Error Log
Process: Xcode [1060]
Path: /Developer/Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 4.1 (516)
Build Info: IDEApplication-516000000000000~18
Code Type: X86-64 (Native)
Parent Process: launchd [173]
Date/Time: 2011-08-08 10:24:33.663 -0400
OS Version: Mac OS X 10.7 (11A511)
@hwrdprkns
hwrdprkns / BitCoin.txt
Created June 25, 2011 14:08
My Bitcoin Address
1AqYrZijbENBSQSyLbsRAGUwbstsvKBg95
@hwrdprkns
hwrdprkns / WebImageGallery.java
Created June 1, 2011 20:32
BitmapScalingAndroid
private Drawable LoadThumbnailFromURL(String url) {
if(downloader.getBitmapFromCache(url) != null){
Bitmap b = downloader.getBitmapFromCache(url);
//HERE IS WHERE I WANT TO SCALE THE IMAGE IF ITS IN THE CACHE
}
try {
URLConnection connection = new URL(url).openConnection();
String contentType = connection.getHeaderField("Content-Type");
@hwrdprkns
hwrdprkns / BuildOrder1
Created May 26, 2011 23:29
Starcraft2ProtossCookieCutter
9 Pylon
10 Queue up 3 Probes and Chrono Boost their production twice in a row.
13 Gateway
14 1st Vespine Gas
16 Pylon
18 Cybernetics Core
18 2nd Vespine Gas
19 Zealot (GET ZEALOT BEFORE CYBERNETICS CORE IF YOUR OPPONENT MIGHT BE AGGRESSIVE)
23 Research Warp Gates
23 Zealot
@hwrdprkns
hwrdprkns / AppRater.java
Created May 19, 2011 13:49
AndroidRateApp Snippet
public class AppRater {
private final static String APP_TITLE = "YOUR-APP-NAME";
private final static String APP_PNAME = "YOUR-PACKAGE-NAME";
private final static int DAYS_UNTIL_PROMPT = 3;
private final static int LAUNCHES_UNTIL_PROMPT = 7;
public static void app_launched(Context mContext) {
SharedPreferences prefs = mContext.getSharedPreferences("apprater", 0);
if (prefs.getBoolean("dontshowagain", false)) { return ; }