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
Properties systemProperties = System.getProperties(); | |
systemProperties.put("net.spy.log.LoggerImpl", "net.spy.memcached.compat.log.SunLogger"); | |
System.setProperties(systemProperties); | |
Logger logger = Logger.getLogger("com.couchbase.client"); | |
logger.setLevel(Level.FINEST); | |
for(Handler h : logger.getParent().getHandlers()) { | |
if(h instanceof ConsoleHandler){ | |
h.setLevel(Level.FINEST); | |
} |
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
#!/bin/sh | |
set -e | |
pkg=vim | |
mandir=/usr/share/man | |
bindir=/usr/local/bin | |
priority=30 | |
update-alternatives --install /usr/bin/vim vim $bindir/vim $priority | |
update-alternatives --install /usr/bin/vimdiff vimdiff $bindir/vim $priority |
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
class ActiveRecord::Base | |
before_validation :strip_whitespace_from_attributes!, :stringify_content_attributes! | |
private | |
# Will strip trailing and leading whitespace from all attributes and convert | |
# empty strings to nil. | |
def strip_whitespace_from_attributes! | |
for col in self.class.content_columns.collect{|c| c.name.to_sym} | |
if !self[col].nil? && self[col].respond_to?(:strip) |
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
=begin | |
Author: Jabari Zakiya, Original: 2009-12-25 | |
Revision-2: 2009-12-31 | |
Revision-3: 2010-6-2 | |
Revision-4: 2010-12-15 | |
Revision-5: 2011-5-11 | |
Revision-6: 2011-5-15 | |
Module 'Roots' provides two methods 'root' and 'roots' | |
which will find all the nth roots of real and complex |
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 |
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
!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
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
upstream thin_cluster { | |
server unix:/var/run/thin.0.sock; | |
server unix:/var/run/thin.1.sock; | |
server unix:/var/run/thin.2.sock; | |
} | |
server { | |
server_name squish.demo.couchbase.com; | |
root /home/couchbase/couchbase-squish/public; |
OlderNewer