Skip to content

Instantly share code, notes, and snippets.

View stevestreza's full-sized avatar

Steve Streza stevestreza

View GitHub Profile
Kindle Fire developers: To link directly to an app in the Amazon Appstore, use this URL scheme:
http://www.amazon.com/gp/mas/dl/android?p=com.your.package.name
Where com.your.package.name is your app's package name.
More info: https://developer.amazon.com/help/faq.html#Marketing
# Save to: ~/Library/Application Support/Textual/Scripts/
# Call with: /spotify
on textualcmd()
set nowPlaying to "I'm not currently playing anything."
# Spotify
if isRunning("Spotify") then
tell application "Spotify"
@stevestreza
stevestreza / LICENSE.txt
Created November 3, 2011 19:13 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
#! /bin/bash
perl -MLWP -MURI::Escape -e '$u=\&uri_unescape;for(@ARGV){($y,$_)=m[(.+m)/.+[=/]([\w-]{11})] or next;&$u(($l=new LWP::UserAgent)->get("$y/get_video_info?&video_id=$_")->content)=~/ap=url=([^&]+).+&title=([^&]+)/;$l->mirror(&$u($1),do{$t=&$u($2);$t=~y#+/# #;"$_.mp4"})}' $1
@stevestreza
stevestreza / Predictions.txt
Created October 2, 2011 22:34
"Let's Talk iPhone" media event predictions
New iOS 5 features
Cheap iPhone 4
iPhone 4S
"magical"
iPhone 5
Scott Forstall demo
Phil Schiller demo
Apple engineer demo
iPad 3
iPad with Retina Display
@stevestreza
stevestreza / NSURL+Pieces.h
Created September 26, 2011 19:52
A method for debugging NSURLs to find where the different pieces of your URL are
#import <Foundation/Foundation.h>
@interface NSURL (Pieces)
-(NSDictionary *)piecesDictionary;
@end
@stevestreza
stevestreza / gist:1034621
Created June 19, 2011 19:12
Huge Bitcoin sell off due to a compromised account - rollback
The bitcoin will be back to around 17.5$/BTC after we rollback all trades
that have happened after the huge Bitcoin sale that happened on June 20th
near 3:00am (JST).
Service should be back by June 20th 10:00am (JST, 01:00am GMT) with all
the trades reversed and accounts available.
One account with a lot of coins was compromised and whoever stole it (using
a HK based IP to login) first sold all the coins in there, to buy those
again just after, and then tried to withdraw the coins. The $1000/day
@stevestreza
stevestreza / MWMacros.h
Created April 17, 2011 16:42
Some convenience macros for common types of objects in ObjC
#define MWDict(...) ((NSDictionary *)[NSDictionary dictionaryWithObjectsAndKeys:__VA_ARGS__, nil])
#define MWArray(...) ((NSArray *)[NSArray arrayWithObjects:__VA_ARGS__, nil])
#define MWSet(...) ((NSSet *)[NSSet setWithObjects:__VA_ARGS__, nil])
#define MWURL(str, ...) ((NSURL *)[NSURL URLWithString:[NSString stringWithFormat:(str), ##__VA_ARGS__]])
#define MWString(str, ...) ((NSString *)[NSString stringWithFormat:(str), ##__VA_ARGS__])
#import <Foundation/Foundation.h>
@interface NSArray(CocoaDevUsersAdditions)
+ (NSArray *)arrayWithObjectsFromArrays:(NSArray *)arrays; //for handiness, especially with HigherOrderMessages
+ (NSArray *)arrayWithClonesOf:(id)object count:(unsigned)count; //for things like FlywheelPattern or maybe a RunArray implementation.
/* please criticize these.... */
+ (NSArray *)arrayWithCRLFLinesOfFile:(NSString *)filePath; // assumes CRLF
+ (NSArray *)arrayWithLinesOfFile:(NSString *)filePath lineEnding:(NSString *)lineEnding;
Hey all, I’d like to give you an update about the state of the Twitter Platform and hopefully provide some much requested guidance.
Since this time last year, Twitter use has skyrocketed. We’ve grown from 48 million to 140 million tweets a day and we’re registering new accounts at an all-time record. This massive base of users, publishers, and businesses is a giant playground for developers to build their own businesses on, and this means the opportunity has grown for everyone.
With more people joining Twitter and accessing the service in multiple ways, a consistent user experience is more crucial than ever. As we talked about last April, this was our motivation for buying Tweetie and developing our own official iPhone app. It is the reason why we have developed official apps for the Mac, iPad, Android and Windows Phone, and worked with RIM on their Twitter for Blackberry app. As a result, the top five ways that people access Twitter are official Twitter apps.
Still, our user research shows that consum