Skip to content

Instantly share code, notes, and snippets.

View robertz's full-sized avatar

Robert Zehnder robertz

View GitHub Profile
@robertz
robertz / gist:4566773
Created January 18, 2013 18:12
Chat application base html
<div id="messageContainer" style="display: none;">
<div id="displayName"><strong>Display Name</strong>: </div><br />
<div id="chatDiv" style="height: 300px; width: 80%; float: left; border: 1px solid gray; overflow: auto; background: #fff;"></div>
<div id="clientDiv" style="height: 300px; width: 18%; float: right; border: 1px solid gray; overflow: auto; background: #fff;"></div>
<br clear="all" />
<br /><br />
<div class="form-inline">
<input id="message" type="text" style="width: 90%;" />
<input type="button" id="send" value="Send" class="btn btn-primary" />
</div>
@robertz
robertz / gist:4449660
Created January 4, 2013 03:23
drop.conf nginx configuration
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ ~$ { access_log off; log_not_found off; deny all; }
location ~ /WEB-INF/ { access_log off; log_not_found off; deny all; }
@robertz
robertz / gist:3662849
Created September 7, 2012 03:34
Chat controller
<cfcomponent>
<cfscript>
variables.instance = structNew();
instance.chatHistory = arrayNew(1);
instance.clients = arrayNew(1);
instance.messageTotal = arrayLen(instance.chatHistory);
</cfscript>
<cffunction name="init" access="public" returntype="chat">
<cfreturn this/>
@robertz
robertz / gist:3154248
Created July 21, 2012 02:08
railo.conf
# Main Railo proxy handler
location ~ \.(cfm|cfml|cfc|jsp|cfr)(.*)$ {
proxy_pass http://127.0.0.1:8888;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
@robertz
robertz / gist:3154238
Created July 21, 2012 02:02
Railo/ACF Template for Nginx
server {
listen 80;
server_name example.com;
root /var/www/example.com;
access_log /var/log/exmaple.access.log;
error_log /var/log/example.error.log;
location / {
# Rewrite rules and other criterias can go here
# Remember to avoid using if() where possible (http://wiki.nginx.org/IfIsEvil)
@robertz
robertz / gist:3130669
Created July 17, 2012 17:20
Sample jqDump document
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; UTF-8" />
<title>Test Page</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
<script src="jqDump.js" type="text/javascript"></script>
</head>
<body>
<div id="content" style="display: inline-block; width: 400px;"></div>