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
public class RxJava { | |
public static void main(String[] args) { | |
Retrofit retrofit = new Retrofit.Builder() | |
.baseUrl("https://google.com/") | |
.addCallAdapterFactory(RxJavaCallAdapterFactory.createAsync()) | |
.build(); | |
Service service = retrofit.create(Service.class); |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/4222316/hack.sh | 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
http://twitter.com/statuses/user_timeline.json?screen_name=mindsnacks |
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
autocmd BufWriteCmd *.html,*.css,*.gtpl :call Refresh_safari() | |
function! Refresh_safari() | |
if &modified | |
write | |
execute "silent ! osascript ~/.vim/applescript/reload_safari.applescript" | |
endif | |
endfunction |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>JSP Page</title> | |
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css"/> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
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
public class RssHandler extends DefaultHandler { | |
private Stack<String> mTagStack = new Stack<String>(); | |
private String currentTagContents; | |
private String currentTag() { return mTagStack.peek(); } | |
private String parentTag() { return mTagStack.get(mTagStack.size() - 2); } | |
public ArrayList<RssItem> mItems = new ArrayList<RssItem>(); | |
private RssItem mCurrentItem; | |
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
public RssParser(String feedURLString) throws Exception { | |
HttpClient client = new DefaultHttpClient(); | |
HttpGet request = new HttpGet(feedURLString); | |
HttpResponse response = client.execute(request); | |
SAXParserFactory f = SAXParserFactory.newInstance(); | |
SAXParser parser = f.newSAXParser(); | |
XMLReader reader = parser.getXMLReader(); | |
RssHandler handler = new RssHandler(); | |
reader.setContentHandler(handler); |
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
public class RssItem { | |
public String title; | |
public String body; | |
public String permalinkURL; | |
public String author; | |
public Date publishedTime; | |
} |
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
$('#search').keypress(function(e) { | |
if(e.which == 13) { | |
$("#form").fadeOut(function() { | |
$("#loading").fadeIn(); | |
}); | |
// The rest of the code will go here. | |
} | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script type="text/javascript" src="http://localhost:3000/socket.io/socket.io.js"></script> | |
<script src="./jquery-1.6.2.min.js"></script> | |
<script type="text/javascript"> | |
var socket = io.connect('http://localhost:3000/'); | |
var handle = ""; |
NewerOlder