Skip to content

Instantly share code, notes, and snippets.

View denzuko's full-sized avatar
💬
twitter.com/denzuko

Dwight Spencer (denzuko@mastodon.social) denzuko

💬
twitter.com/denzuko
View GitHub Profile
/* fucking gist */
.gist .gist-syntax {
overflow-x: hidden !important;
}
.gist .gist-meta {
font-family: Verdana;
font-size: 8px !important;
}
@denzuko
denzuko / restmq.rb
Created October 8, 2010 13:56 — forked from gleicon/restmq.rb
# Sinatra minimalist RestMQ
# no COMET, just /q/ routes and queue logic
# the core of RestMQ is how it uses Redis' data types
%w(rubygems redis sinatra).each do |lib| require lib; end
QUEUESET = 'QUEUESET' # queue index
UUID_SUFFIX = ':UUID' # queue unique id
QUEUE_SUFFIX = ':queue' # suffix to identify each queue's LIST
@denzuko
denzuko / gist:674933
Created November 13, 2010 00:08 — forked from jpemberthy/gist:65878
Devnet Capistrano deployment recipe
load 'deploy' if respond_to?(:namespace)
set :application, do
Capistrano::CLI.ui.ask "Your application name: "
end
set :user, do
Capistrano::CLI.ui.ask "Username: "
end
set :group, "www-data"

Privacy Policy

Last revised on [DATE]

The Gist

[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.

We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.

Terms of Service

Last revised on [DATE]

The Gist

[COMPANY] operates the [SERVICE] service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.

For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

@denzuko
denzuko / webapp.rb
Created February 10, 2011 12:19 — forked from igrigorik/webapp.rb
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end
require 'rubygems'
require 'rack'
require 'uri'
require 'json'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?).collect! { |item| URI.unescape(item)}
@denzuko
denzuko / LICENSE
Created May 10, 2011 22:52 — forked from hugs/LICENSE
The Node.js "Hello World" web server ported to CoffeeScript
I, Jason Huggins, the author of the work "CoffeeScript Web Server" (2010), irrevocably renounce
all current and future legal rights to the work in any medium whatsoever.
I stand behind the merit of the work, but disclaim all liability for it under law.
I encourage you, the audience, to share, copy, distribute, perform, remix, mash up, interpret,
excerpt, translate, and otherwise enjoy and use the work as you will.
I request that you acknowledge my authorship.
@denzuko
denzuko / bot.rb
Created January 15, 2012 12:59 — forked from jpr5/bot.rb
XMPP/Ruby Bot for HipChat
#!/usr/bin/env ruby
#
# Script: HipChat bot in Ruby
# Author: Jordan Ritter <jpr5@darkridge.com>
#
unless `rvm-prompt i g`.chomp == "ree@xmpp"
exec("rvm ree@xmpp ruby #{$0}")
end
@denzuko
denzuko / app.js
Created April 11, 2012 05:58 — forked from nrstott/app.js
Bogart CouchDB Blog code translated to use MongoDB
var bogart = require('bogart');
var Q = require('promised-io/lib/promise');
var mongoose = require('mongoose');
var PostSchema = new mongoose.Schema({
title: String,
body: String,
comments: [ CommentSchema ]
});