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
| Code Effect | |
| 0 Turn off all attributes | |
| 1 Set bright mode | |
| 4 Set underline mode | |
| 5 Set blink mode | |
| 7 Exchange foreground and background colors | |
| 8 Hide text (foreground color would be the same as background) | |
| 30 Black text | |
| 31 Red text | |
| 32 Green text |
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
| svn st | awk '{print $2}' | sudo xargs rm -rf |
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 code was copied-pasted from a Joe Armstrong's blog post at: | |
| Comet is dead long live websockets | |
| http://armstrongonsoftware.blogspot.com/2009/12/comet-is-dead-long-live-websockets.html |
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
| Source code copied-pasted from blog post titled "Misultin: erlang and websockets". | |
| http://www.ostinelli.net/misultin-erlang-and-websockets/ | |
| This is based on misultin, an Erlang library for building fast lightweight HTTP(S) servers. | |
| http://code.google.com/p/misultin/ |
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 sample is strongly based on Erlectricity, avaliable from: | |
| http://github.com/mojombo/erlectricity | |
| The echo.rb is the same, but the echo.erl is really a little bit better. It's because I refactored it to | |
| extract functions to send and receive messages and also (and more important) introduce some patterns on | |
| receive statement to matching other messages (specially to receive exit_status messages from "dead" ports). | |
| More sugar is always good. At least for me. ;) |
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
| %% @doc Utilities for working with mochijson2 struct. | |
| %% | |
| %% COPYRIGHT - stickyNotes sample application by beepbeep. | |
| %% struct example : | |
| %% | |
| %% S = {struct, [ | |
| %% {<<"name">>, <<"Foo">>}, | |
| %% {<<"activity">>, {struct, [ | |
| %% {<<"name">>, <<"Basketball">>} |
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
| %% @author Leandro Silva <leandrodoze@gmail.com> | |
| %% @copyright 2009 Leandro Silva. | |
| %% @doc Helper module for http operations using httpc and mochiweb_request modules. | |
| -module(http_helper). | |
| -author('Leandro Silva <leandrodoze@gmail.com>'). | |
| -export([http_post/2, http_get/1, http_put/2, http_delete/1]). | |
| -export([http_response/2, http_response/3, http_response/4]). |
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 code was made by Yariv Sadan <yarivsblog@gmail.com> [http://yarivsblog.com], available from: | |
| http://code.google.com/p/erlyweb/source/browse/trunk/src/smerl/smerl.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
| package nonblocking.client; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.net.InetAddress; | |
| import java.net.InetSocketAddress; | |
| import java.nio.ByteBuffer; | |
| import java.nio.CharBuffer; | |
| import java.nio.channels.SocketChannel; |
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.io.IOException; | |
| import java.net.SocketAddress; | |
| import java.nio.channels.SelectionKey; | |
| import java.nio.channels.Selector; | |
| import java.nio.channels.ServerSocketChannel; | |
| import java.nio.channels.SocketChannel; | |
| /** | |
| * Handles new client connections. | |
| * An Acceptor is bound on a ServerSocketChannel objects, which can produce new |