Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/main/java/com/github/rnewson/couchdb/lucene/SearchRequest.java b/src/main/java/com/github/rnewson/couchdb/lucene/SearchRequest.java
index 12abf8a..a5d5966 100644
--- a/src/main/java/com/github/rnewson/couchdb/lucene/SearchRequest.java
+++ b/src/main/java/com/github/rnewson/couchdb/lucene/SearchRequest.java
@@ -254,11 +254,11 @@ public final class SearchRequest {
if (debug) {
headers.put("Content-Type", "text/plain;charset=utf-8");
result.put("body", escape(json.toString(2)));
+ } else if (callback != null) {
+ headers.put("Content-Type", "text/plain;charset=utf-8");
class BankAccount < ActiveRecord::Base
# Umsätze von start_date bis end_date abrufen
# * passport_type, passphrase, pin und file kommen in dieser Implementation aus der zugrunde liegenden Tabelle.
# * Wenn passport_type = "PinTan" ist, wird die pin verwendet.
# * Wenn passport_type = "RDHNew" ist, wird die Schlüsseldatei aus filename verwendet und mit der passphrase entschlüsselt.
def get_transactions(start_date, end_date)
HBCIUtils.setParam("client.passport.#{passport_type}.filename", filename)
HBCIUtils.setParam("client.passport.#{passport_type}.init", '1')
@djmaze
djmaze / parallel_assets_compiler.gemspec
Created August 20, 2012 13:08 — forked from joerichsen/parallel_assets_compiler.gemspec
Microgem for compiling assets in parallel
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jorgen Orehoj Erichsen'
s.email = 'joe@erichsen.net'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
@djmaze
djmaze / agilezen.com.js
Created February 4, 2013 16:11
Highlight current story phase on story detail page in AgileZen
$('a[title^="The story is currently in the"]').css('font-weight', 'bold')
@djmaze
djmaze / export_wp.rb
Last active December 12, 2015 07:18 — forked from hechien/export_wp.rb
# RAILS_ENV=production bundle exec rails runner ./script/wp_export.rb >! blog.wxr
# Require nokogiri in Gemfile here
site_link = "http://tersesystems.com/"
site_name = "Terse Systems"
builder = Nokogiri::XML::Builder.new do |xml|
xml.rss('version' => "2.0",
'xmlns:content' => "http://purl.org/rss/1.0/modules/content/",
'xmlns:wfw' => "http://wellformedweb.org/CommentAPI/",
@djmaze
djmaze / spotify-stream.sh
Last active September 17, 2022 14:14
Serving Spotify audio through an MP3 stream via http (using Pulseaudio)
#!/usr/bin/env bash
#
# needs: Pulseaudio, VLC
# Load null sink module if not already loaded
pacmd list-sinks | grep steam 2>&1 >/dev/null
if [[ $? == 1 ]]; then
pactl load-module module-null-sink sink_name=steam;
fi
@djmaze
djmaze / Dockerfile
Created November 1, 2013 13:00
Dockerfile for ArangoDB
FROM ubuntu
RUN apt-get -y install wget
RUN echo 'deb http://www.arangodb.org/repositories/arangodb/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/arangodb.list && \
wget http://www.arangodb.org/repositories/arangodb/xUbuntu_12.04/Release.key && \
apt-key add - < Release.key
RUN apt-get update && apt-get -y install arangodb=1.4.0
CMD /usr/sbin/arangod -c /etc/arangodb/arangod.conf
EXPOSE 8529
@djmaze
djmaze / Dockerfile
Last active December 27, 2015 05:18
Dockerfile for Ghost (production installation)
# Install Ghost blogging platform and run in production environment on port 2368.
#
# 1. Clone https://github.com/TryGhost/Ghost.git and put this file into the project root directory.
# 2. Replace www.example.com (down below) with the FQDN the blog is supposed to run on.
# 3. Build with:
# sudo docker build -t ghost .
# 4. Create local data directory:
# mkdir -p ~/.docker_volumes/ghost/data
#
# Run it with:
@djmaze
djmaze / output
Last active December 29, 2015 01:19
dind on Arch Linux
sudo docker run -privileged -t -i jpetazzo/dind
/proc/self/fd /
/
root@395a5d16f74c:/# 2013/11/22 00:37:54 WARNING: Your kernel does not support cgroup swap limit.
2013/11/22 00:37:54 Listening for HTTP on /var/run/docker.sock (unix)
root@395a5d16f74c:/# docker run busybox /bin/sh
2013/11/22 00:38:11 POST /v1.4/containers/create
Unable to find image 'busybox' (tag: latest) locally
2013/11/22 00:38:11 POST /v1.4/images/create?fromImage=busybox&tag=
@djmaze
djmaze / install-oath-hotp-on-yubikey.sh
Created December 13, 2013 21:35
Setting up the OATH HOTP applet on the Yubikey NEO with Arch Linux
# Install personalization tools
yaourt -S yubikey-personalization-gui-git
# Change the key's USB mode to 82
sudo ykpersonalize -m 82
# Install gpshell and cap file
yaourt -S ccid gpshell gppcscconnectionplugin
wget http://opensource.yubico.com/ykneo-oath/releases/ykneo-oath-0.2.1.cap
wget https://raw.github.com/Yubico/ykneo-oath/master/gpinstall.txt