Skip to content

Instantly share code, notes, and snippets.

View rambocoder's full-sized avatar

Alex Kaplan rambocoder

View GitHub Profile
@rambocoder
rambocoder / gist:2492590
Created April 25, 2012 19:31 — forked from rokob/gist:2466176
Getting live updates and deletes in ChicagoBoss Tutorial
% src/view/greeting/live.html
<html><head>
<title>Fresh hot greetings!</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script>
function listen_for_events(timestamp) {
$.ajax("/greeting/pull/"+timestamp, { success:
function(data, code, xhr) {
for (var i=0; i<data.greetings.length; i++) {
@rambocoder
rambocoder / boss_rebar.erl
Created April 4, 2012 18:46
Windows Support. Updated start-server.bat for ChicaboBoss skeleton, and ChicagoBoss\priv\rebar\boss_rebar.erl with windows support
%%%-------------------------------------------------------------------
%%% @author Jose Luis Gordo Romero <jgordor@gmail.com>
%%% @doc Chicago Boss rebar functions, called from boss_plugin
%%% Managing compilation/configuration/scripts stuff, the boss way
%%% @end
%%%-------------------------------------------------------------------
-module(boss_rebar).
-export([run/4,
help/0,
process(Data) ->
gen_server:cast(?SERVER, {process, Data});
...
handle_cast({process, Data}, {}) ->
do_some_funky_stuff(Data),
reader:pop(self);
{ok, {}}