Skip to content

Instantly share code, notes, and snippets.

Tony Cosentini tonycosentini

Block or report user

Report or block tonycosentini

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
public class RxJava {
public static void main(String[] args) {
Retrofit retrofit = new Retrofit.Builder()
Service service = retrofit.create(Service.class);
tonycosentini /
Created Dec 6, 2012 — forked from amrox/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
View gist:3821692
tonycosentini / .vimrc
Created May 31, 2012
Safari Reload Vim Plugin
View .vimrc
autocmd BufWriteCmd *.html,*.css,*.gtpl :call Refresh_safari()
function! Refresh_safari()
if &modified
execute "silent ! osascript ~/.vim/applescript/reload_safari.applescript"
View gist:1431281
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<link rel="stylesheet" href=""/>
<script src=""></script>
View gist:1386924
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;
View gist:1386201
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();
View gist:1386169
public class RssItem {
public String title;
public String body;
public String permalinkURL;
public String author;
public Date publishedTime;
tonycosentini / Enter.js
Created Oct 24, 2011
Empty Page
View Enter.js
$('#search').keypress(function(e) {
if(e.which == 13) {
$("#form").fadeOut(function() {
// The rest of the code will go here.
View index.html
<!DOCTYPE html>
<html lang="en">
<script type="text/javascript" src="http://localhost:3000/"></script>
<script src="./jquery-1.6.2.min.js"></script>
<script type="text/javascript">
var socket = io.connect('http://localhost:3000/');
var handle = "";
You can’t perform that action at this time.