git clone [email protected]:websocket-rails/websocket-rails.git
If you are planning on submitting a pull request, fork the project to your own account first and clone it from there.
Your username on Github: DanKnox | |
Please publicly post the following Gist, and name it keybase.md | |
### Keybase proof | |
I hereby claim: | |
* I am danknox on github. | |
* I am danknox (https://keybase.io/danknox) on keybase. | |
* I have a public key ASBHRii0bwhUxa5X02Ga2jcSea48tgohI7JRaCv3kYQOiwo |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
/* | |
Browserify Live Demos! | |
How to make your own: | |
1. Clone this RequireBin | |
2. Adjust the REQUIRES section | |
3. Create a gist with demo snippets that can be run | |
4. Put the id for that gist into the demoGist variable | |
*/ | |
/* REQUIRES: Put modules you need in your demo in this Array */ |
#include "picohttpparser.h" | |
#include <mruby.h> | |
#include <mruby/data.h> | |
#include <mruby/variable.h> | |
#include <mruby/array.h> | |
#include <mruby/string.h> | |
#include <mruby/class.h> | |
#define PHR_MAX_HEADERS 255 |
# By default Redis does not run as a daemon. Use 'yes' if you need it. | |
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. | |
daemonize yes | |
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by | |
# default. You can specify a custom pid file location here. | |
pidfile /var/run/redis.pid | |
# Accept connections on the specified port, default is 6379. | |
# If port 0 is specified Redis will not listen on a TCP socket. |
-----BEGIN PGP MESSAGE----- | |
Version: GnuPG v1.4.13 (Darwin) | |
owGbwMvMwMR4WcFofv8mnzmMpw+8SGIIFm/0rFZKyk+pVLKqVspOBVNpmXnpqUUF | |
RZl5JUpWSgZJJkmJFsmmqSlmhuYmlqnGSRbmJkmpRinGRgbGRpZpFmlJRibJlslK | |
OkoZ+cUgHUBjkhKLU/Uy84FiQE58ZgpQ1AWi3s3CzcnIxNnSGShXCpYwS7MwNDQ0 | |
STQ2TzM1T06yMDM1SU4yTLM0MjG0NEs1MAApLE4tykvMTQWqTknMy87Lr1Cq1VEC | |
CpZlJqeCnAyVTM8syShNQtXgkpjnDdVQUlkAEilPTYqH6o1PysxLAXoXqKUstag4 | |
Mz9PycoQqDK5JBOk2dDY0sTAxNLY1FhHKbWiILMoNT4TpMLU3MzCAAh0lAqKUsuA | |
RqalARWZmhsZJhkbJqeaWZgYphkDeQYmBhYmSUmWFimmlhbmicamBpbG5knJxmkG |
class ChannelManager | |
attr_reader :channels, :channel_tokens | |
def initialize | |
@channels = {}.with_indifferent_access | |
@channel_tokens = ChannelTokens.new | |
end | |
def [](channel) |
git clone [email protected]:websocket-rails/websocket-rails.git
If you are planning on submitting a pull request, fork the project to your own account first and clone it from there.
/****** Current Format ******/ | |
// Basic Message | |
metadata = { | |
id: 1234234234, // Randomly generated by the client. Used for receiving success/fail callbacks | |
client_id: 123456 // Sent from the server with the `websocket_rails.client_connected` event which is sent after the connection is opened. Store this and send it with each message. | |
data: {name: 'shoes'} // Arbitrary data. Can be Object or String. This is available through #message or #data in the controller. | |
} | |
event = ["products.new", metadata] |
Calling this function: | |
interval = iteration at which to execute the GC cleanup. We can set this to a reasonable value and add this call right before the main outer loop that begins to process the set of Surveys. In our case we will probably set it to 1 or 2 so it runs the GC after every other survey set processing. | |
cleanupMemory(interval) | |
<cffunction name="cleanupMemory" output="true" returntype="void"> | |
<!--- ColdFusion doesn't run garbage collection until onRequestEnd. ---> | |
<!--- Since this is such a long running script, we must run it sooner. ---> | |
<cfargument name="interval" required="true" type="numeric"> |