Skip to content

Instantly share code, notes, and snippets.

View ToddG's full-sized avatar

ToddG ToddG

View GitHub Profile
@ToddG
ToddG / get_feed_srv.erl
Created September 16, 2012 16:46
erlang code to process a json feed : total wip, only downloads currently
-module(get_feed_srv).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
%%-export([start_link/0, get_feed/1, process_redirect/1, process_response/1]).
-export([start_link/0, get_feed/1]).
@ToddG
ToddG / rebar-reltool-relase-notes.md
Created September 15, 2012 16:46
using rebar to create an erlang app with a dependency, and then starting a release created with reltool

Summary

I'm trying to figure out how to use rebar to:

  • create erlang project
  • add a dependency on an erlang module from github
  • start the app via the erl console
  • create a release and start the app from the release (via the generated scripts)
@ToddG
ToddG / install-python-2.7.sh
Created July 10, 2012 03:19
intalling python2.7 on centos 6.2
#from https://mythinkpond.wordpress.com/2011/12/28/how-to-upgrade-to-python-2-7-on-centos/
#
# Note: installs python27 (and pip) into /usr/local/bin
# I added this to update my enviroment:
#
# new file: /etc/profile.d/local-bin.sh
# contains the following line:
#
# export PATH=$PATH:/usr/local/bin
#
@ToddG
ToddG / TimerWebSocketServlet.java
Created July 4, 2012 15:05
AngularJS + Jetty + WebSockett Example : TimerWebSocketServlet
import org.eclipse.jetty.websocket.WebSocket;
import org.eclipse.jetty.websocket.WebSocketServlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
@ToddG
ToddG / HelloWebView.java
Created May 6, 2012 03:46
Simplified JavaFX Example
package hellowworld;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.concurrent.Worker;
import javafx.geometry.HPos;
import javafx.geometry.VPos;
import javafx.scene.Node;
import javafx.scene.Scene;
@ToddG
ToddG / khanfeed-rss2.0.xml
Created April 21, 2012 21:57
Khan Academy Video Feed v4
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>KhanAcademy Video Feed</title>
<link>http://www.khanacademy.org</link>
<description>
(from the Khan site) 'A free world-class education for anyone anywhere.
The Khan Academy is an organization on a mission. We're a not-for-profit with the goal of changing education for the better by providing a free world-class education to anyone anywhere.
@ToddG
ToddG / khanfeed-rss2.0.xml
Created April 17, 2012 01:17
Khan Academy Video Feed v3
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>KhanAcademy Video Feed</title>
<link>http://www.khanacademy.org</link>
<description>
(from the Khan site) 'A free world-class education for anyone anywhere.
The Khan Academy is an organization on a mission. We're a not-for-profit with the goal of changing education for the better by providing a free world-class education to anyone anywhere.
@ToddG
ToddG / sample-atom-1.0-feed.xml
Created March 4, 2012 20:26
sample-atom-1.0-feed
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<subtitle>Insert witty or insightful remark here</subtitle>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
<email>johndoe@example.com</email>
@ToddG
ToddG / sample-rss-2.0-feed.xml
Created March 4, 2012 20:25
sample-rss-2.0-feed
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Example Feed</title>
<description>Insert witty or insightful remark here</description>
<link>http://example.org/</link>
<lastBuildDate>Sat, 13 Dec 2003 18:30:02 GMT</lastBuildDate>
<managingEditor>johndoe@example.com (John Doe)</managingEditor>
@ToddG
ToddG / master-feed-list.json
Created February 24, 2012 04:47
Master feed list for Offline Content Viewer
[
"http://www.archive.org/services/collection-rss.php?collection=academic_films",
"https://raw.github.com/gist/2439877/7a0c7b403b87d24cc90ec28fa8f3f25ad9ec8b80/khanfeed-rss2.0.xml"
]