This file contains hidden or 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
| """ | |
| Cachedis | |
| ~~~~~ | |
| Just a dummy abstraction for a Redis-based cache. | |
| https://gist.github.com/790787 | |
| :copyright: (c) 2010 by Leandro Silva (CodeZone). | |
| :license: Just FREE. |
This file contains hidden or 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
| To use Ivy and Iron Hammer on Mac OS X follow these steps: | |
| 1. Clone my fork of IronHammer repository at Github: | |
| $ git clone https://github.com/leandrosilva/Iron-Hammer.git | |
| 2. Create a .settings directory (or some other name you prefer) with a layout like this: | |
| .settings | |
| | |
This file contains hidden or 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
| To use Ivy and Iron Hammer on Mac OS X follow these steps: | |
| 1. Download and extract Ivy to /opt/ivy (or other place you want) | |
| 2. Clone my fork of IronHammer repository at Github: | |
| $ git clone https://github.com/leandrosilva/Iron-Hammer.git | |
| 3. Create a .settings directory (or some other name you prefer) with a layout like this: |
This file contains hidden or 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
| This is a quick sample on how I have used websocket_client to test Erlang WebSocket-based applications. To | |
| taste it you will need to have a copy of websocket_client from my fork, available at: | |
| https://github.com/leandrosilva/erlang_websocket/blob/master/src/websocket_client.erl | |
| The websocket_client module was made by Dave Bryson on erlang_websocket project: | |
| https://github.com/davebryson/erlang_websocket | |
| Enjoy! |
This file contains hidden or 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
| APP_NAME := my_awesome_app | |
| all: compile | |
| compile: clear | |
| @cp src/$(APP_NAME).app ebin/ | |
| @erlc -pa ebin/ -o ebin/ src/*.erl | |
| compile_test: compile | |
| @erlc -pa ebin/ -o ebin/ test/*.erl |
This file contains hidden or 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
| As always, I'm just playing with interesting things to relax a little bit. Just it. | |
| == 1. Dependencies | |
| I tried to use redis-clojure but it sucks and I shifted to Jedis which rocks. So if you want to try | |
| as well, this little joke (ops! I mean...) program depends on: | |
| * org.clojure/clojure "1.2.0" | |
| * org.clojure/clojure-contrib "1.2.0" | |
| * redis.clients/jedis "1.5.2" |
This file contains hidden or 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 ruby | |
| # Example: | |
| # | |
| # $ ./replacer foo bar *.* | |
| # | |
| # foo.app > bar.app | |
| # foo.erl > bar.erl | |
| # foo_app.erl > bar_app.erl | |
| # foo_sup.erl > bar_sup.erl |
This file contains hidden or 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
| %% | |
| %% erlang_syslog | |
| %% https://github.com/JacobVorreuter/erlang_syslog | |
| %% | |
| %% erlc -D log_info awesome_module.erl | |
| %% | |
| -ifdef(log_debug). | |
| -define(DEBUG(Msg), erlang:apply(syslog, debug, [cameron_syslog, Msg])). | |
| -define(DEBUG(Msg, Args), erlang:apply(syslog, debug, [cameron_syslog, io_lib:format(Msg, Args)])). |
This file contains hidden or 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
| import java.net.*; | |
| import java.io.*; | |
| public class ElasticSysjog { | |
| public static void main(String[] args) throws IOException { | |
| System.out.println("=== ElasticSysjog up and running ==="); | |
| final int PORT = 1514; // default Syslog UDP port is 514 | |
| final int BUFFER_SIZE = 10000; | |
This file contains hidden or 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
| leandro@codezone ~/Projects/erlang/kelly/cameron (rebar-conversion) | |
| $ make devclean | |
| rm -rf dev | |
| leandro@codezone ~/Projects/erlang/kelly/cameron (rebar-conversion) | |
| $ make devrel | |
| ./rebar get-deps | |
| ==> misultin (get-deps) | |
| ==> redo (get-deps) | |
| ==> erl_helpers (get-deps) |