This file contains 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
<html> | |
<head> | |
<title>Welcome to nginx!</title> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script type="text/javascript" src="templater.js"></script> | |
</head> | |
<body bgcolor="white" text="black"> | |
<div id="one">Location #1</div> | |
<div id="two">Location #2</div> | |
</body> |
This file contains 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
<dl> | |
<dt>"Foo":</dt> | |
<dd><!-- #foo# --></dd> | |
<dt>"Bar":</dt> | |
<dd><!-- #bar# --></dd> | |
</dl> |
This file contains 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
<dl> | |
<dt>"Foo":</dt> | |
<dd><!-- #foo# --></dd> | |
<dt>"Bar":</dt> | |
<dd><!-- #bar# --></dd> | |
</dl> |
This file contains 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
function process_template(url, id, data) { | |
$.ajax({ | |
url: url, | |
data: data, | |
success: function(msg, ts) { $(id).empty(); $(id).append(msg); } | |
}); | |
} | |
function process_json(push_object) { | |
if (push_object && push_object.url && push_object.data && push_object.id) |
This file contains 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
require 'rubygems' | |
require "dbi" | |
require 'pg' | |
dbh = DBI.connect("dbi:Pg:gosu_dev", "erikh") | |
dbh.do("drop table stuff") rescue nil | |
dbh.do("create table stuff (id serial primary key, my_string varchar(20), my_integer integer, my_time timestamp)") | |
chars = ('a'..'z').to_a + ('0'..'9').to_a |
This file contains 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
require 'rubygems' | |
require "dbi" | |
require 'pg' | |
dbh = DBI.connect("dbi:Pg:gosu_dev", "erikh") | |
dbh.do("drop table stuff") rescue nil | |
dbh.do("create table stuff (id serial primary key, my_string varchar(20), my_integer integer, my_time timestamp)") | |
chars = ('a'..'z').to_a + ('0'..'9').to_a |
This file contains 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/ruby | |
require 'pp' | |
log = File.open('access.log', 'r') | |
begin | |
lines = [] | |
5.times do | |
line = log.readline |
This file contains 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
## The tests in /some/path/test/suite/example.rb [ruby] | |
BareTest.suite "Map Example Suite" do | |
suite "Regular Nested Suite" do | |
assertion "A successful assertion" do | |
true | |
end | |
assertion "A failing assertion" do | |
failure "Just as an example" | |
end |
This file contains 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
require 'socket' | |
include Socket::Constants | |
module Swiftcore | |
module Analogger | |
# Swift::Analogger::Client is the client library for writing logging | |
# messages to the Swift Analogger asynchronous logging server. | |
# | |
# To use the Analogger client, instantiate an instance of the Client |
This file contains 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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; |