Skip to content

Instantly share code, notes, and snippets.

Dreampuf dreampuf

Block or report user

Report or block dreampuf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
schuster-rainer / rx_websocket_protokol.html
Created Feb 20, 2012
WebSocket Demo using ws4py, cherrypy to echo incomming traffic. CoffeeScript, jQuery, RxJS, websock.js for the Client
View rx_websocket_protokol.html
<!DOCTYPE html>
<html lang="de">
<meta charset="utf-8" />
<title>Pushing with Rx and websock.js</title>
<script src="script/jquery-1.7.1.js" type="text/javascript"></script>
<script src="script/rx.min.js" type="text/javascript"></script>
<script src="script/rx.jquery.js" type="text/javascript"></script>
<script src="script/rx.time.min.js" type="text/javascript"></script>
<script src="script/base64.js"></script>
dw /
Last active Sep 27, 2017
ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/dmw/.ansible/cp/4e8d7ac1b9 u
'/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
rgl / nexus-provision.groovy
Last active May 16, 2018
provision nexus users that can push or deploy to any repository (e.g. NuGet or Maven)
View nexus-provision.groovy
// see
// see
import groovy.json.JsonOutput
import org.apache.shiro.subject.SimplePrincipalCollection
shnjp /
Created Mar 5, 2011
ssh tunnel for Fabric
Fabric tunneling utilities
class ForwardServer and relates things are refere Robey Pointer's paramiko example.
with make_tunnel('user@') as t:
esamson / .gitignore
Last active Apr 28, 2019
systemd service file for sonatype nexus. Put this in `$HOME/.config/systemd/user/nexus.service`. Launch with `systemctl --user start nexus`.
View .gitignore
View gist:500145
// The `quickEach` method will pass a non-unique jQuery instance
// to the callback meaning that there will be no need to instantiate
// a fresh jQuery instance on each iteration. Most of the slow-down
// inherent in jQuery's native iterator method (`each`) is the constant
// need to have access to jQuery's methods, and so most developers
// see constructing multiple instances as no issue... E.g.
// $(...).each(function(){ $(this)... $(this)... $(this)... });
// A better approach would be `quickEach`.
jQuery.fn.quickEach = (function(){
View ssh
package main
import (
baali /
Created Dec 6, 2011
A Python script to break audio into chunks of smaller audios and using Google API to get Speech to Text.
A hack based on this While with smaller voice samples google speech to text works really good, as length increases quality decreases. So here using audiolab and numPy we are breaking audio sample, in smaller chunks, and removing blank/empty spaces from audio signal and then pushing them to google for processing.
It takes wav file format as input but can be changed to other formats too.
from scikits.audiolab import wavread, play, flacwrite
from numpy import average, array, hstack
import os
import sys
josegonzalez / access.lua
Created Dec 3, 2012
Simple lua file enabling oauth support for nginx via nginx-lua and access_by_lua.
View access.lua
- certain endpoints are always blocked
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then
-- import requirements
local cjson = require "cjson"
-- setup some app-level vars
local app_id = "APP_ID"

Start Kafka service

The following commands will start a container with Kafka and Zookeeper running on mapped ports 2181 (Zookeeper) and 9092 (Kafka).

docker pull spotify/kafka
docker run -d -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=kafka --env ADVERTISED_PORT=9092 --name kafka spotify/kafka

Why Spotify?

ADVERTISTED_HOST was set to kafka, which will allow other containers to be able to run Producers and Consumers.

You can’t perform that action at this time.