http://dustinphoto.couchone.com/test/_design/hacks/_view/all_keys?group_level=1
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
package com.couchbase.sample.dataloader; | |
import com.couchbase.client.CouchbaseClient; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.util.List; | |
import net.spy.memcached.internal.OperationFuture; | |
import net.spy.memcached.ops.OperationStatus; | |
/** |
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
# GistID: 1924422 | |
# Author:: Couchbase <info@couchbase.com> | |
# Copyright:: 2011, 2012 Couchbase, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
!URxvt*scrollstyle: plain | |
URxvt.scrollBar: False | |
URxvt.font: xft:DejaVu Sans Mono:pixelsize=11:antialias=true | |
URxvt.boldFont: xft:DejaVu Sans Mono:Bold:pixelsize=11:antialias=true | |
URxvt*foreground: #000000 | |
!URxvt*background: #d3d7cf | |
URxvt*background: #dedede | |
! black |
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
### | |
# JSONDB - a compressed JSON format | |
# By Devon Govett | |
# Originally proposed by Peter Michaux - http://michaux.ca/articles/json-db-a-compressed-json-format | |
# | |
# jsondb.pack converts an array of objects with the same keys (i.e. from a database) | |
# and flattens them into a single array, which is much smaller than the pure json | |
# representation where the keys are repeated for each item in the array. | |
# Combine with JSON.stringify to send compressed JSON data over the network. | |
# |
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
# config/environment/development.rb: | |
# require 'lib/sc_middleware' | |
# config.middleware.use ScMiddleware | |
class ScMiddleware | |
def initialize(app) | |
@app = app | |
SC::Rack::Service.filesystem = true | |
@project = SC::Project.load(File.dirname(__FILE__)+"/../public/self_video", :parent => SC.builtin_project) | |
@sproutcore = SC::Rack::Service.new([@project]) |
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
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
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 '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 |
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
diff --git a/postgresql/9.0/main/pg_hba.conf b/postgresql/9.0/main/pg_hba.conf | |
index 18831d3..f0d0e1d 100644 | |
--- a/postgresql/9.0/main/pg_hba.conf | |
+++ b/postgresql/9.0/main/pg_hba.conf | |
@@ -80,13 +80,13 @@ | |
# (custom daily cronjobs, replication, and similar tasks). | |
# | |
# Database administrative login by UNIX sockets | |
-local all postgres ident | |
+# local all postgres trust |
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/env ruby | |
workspaces = {} | |
`wmctrl -d`.each_line do |line| | |
columns = line.split | |
if columns[7] == "N/A" | |
workspace_name = columns[8..-1].join(" ") | |
else | |
workspace_name = columns[9..-1].join(" ") | |
end |