Skip to content

Instantly share code, notes, and snippets.

View bearprada's full-sized avatar
🎯
Focusing

PRADA Hsiung bearprada

🎯
Focusing
  • Facebook
  • London, UK
View GitHub Profile
@bearprada
bearprada / gist:1ff7fb05ba04c8a79cf4
Created April 19, 2015 01:11
2015 AWS SFO Summit
Online Video :
https://www.youtube.com/playlist?list=PLhr1KZpdzukeD0iBeDI9WqZLYtuaFaaGc&mkt_tok=3RkMMJWWfF9wsRonu67Jc%2B%2FhmjTEU5z16eUoW66%2Fh4kz2EFye%2BLIHETpodcMT8NgMLDYDBceEJhqyQJxPr3NJdMN0cN8RhjjAQ%3D%3D
Slides
http://www.slideshare.net/AmazonWebServices/tag/2015sfsummit?mkt_tok=3RkMMJWWfF9wsRonu67Jc%2B%2FhmjTEU5z16eUoW66%2Fh4kz2EFye%2BLIHETpodcMT8NgMLDYDBceEJhqyQJxPr3NJdMN0cN8RhjjAQ%3D%3D
@bearprada
bearprada / alg1.java
Created April 18, 2015 15:54
quiz_match_company_times
for (Company comp : companies) {
int userIdx = 0
for (Time time : comp.times) {
(0..5).each {
time.add(comp.user[userIdx++])
}
}
}
@bearprada
bearprada / MainActivity.java
Last active August 29, 2015 14:03
Restful API Integration on Android
...
protected onCreate(Bundle savedStateInstance) {
NetworkTask task = new NetworkTask(this);
NetworkTask.execute();
}
public void successful(List<Repo> repos) {
// do something
}
public void fail(Exception e) {
...
protected onCreate(Bundle savedStateInstance) {
RestAdapter restAdapter = new RestAdapter.Builder()
.setEndpoint("https://example.com")
.build();
SampleService service = restAdapter.create(SampleService.class);
List<Repo> repos = service.listRepos("PRADA", 10);
}
...