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)
| -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]). |
| #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 | |
| # |
| 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.*; |
| 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; |
| <?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. |
| <?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. |
| <?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>[email protected]</email> |
| <?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>[email protected] (John Doe)</managingEditor> |
| [ | |
| "http://www.archive.org/services/collection-rss.php?collection=academic_films", | |
| "https://raw.github.com/gist/2439877/7a0c7b403b87d24cc90ec28fa8f3f25ad9ec8b80/khanfeed-rss2.0.xml" | |
| ] |