Skip to content

Instantly share code, notes, and snippets.

@andyvanee
andyvanee / .ssh_config
Last active November 30, 2023 04:19
Fix unix_listener too long for Unix domain socket
Host *
ControlPath ~/.ssh/control/%C
ControlMaster auto
@squito
squito / reflector.scala
Last active September 24, 2020 01:09
utils for accessing field & methods that are private in the scala repl via reflection
/* For example, I want to do this:
*
* sqlContext.catalog.client.getTable("default", "blah").properties
*
* but none of that is public to me in the shell. Using this, I can now do:
*
* sqlContext.reflectField("catalog").reflectField("client").reflectMethod("getTable", Seq("default", "blah")).reflectField("properties")
*
* not perfect, but usable.
*/
@viktorklang
viktorklang / gbr.txt
Created June 30, 2015 08:43
shell alias for showing git branches sorted by last activity date
alias gbr='git for-each-ref --sort="-authordate:iso8601" --format=" %(color:green)%(authordate:iso8601)%09%(color:white)%(refname:short)" refs/heads'
@adelton
adelton / fetch-single-pull-request-from-github
Last active June 23, 2020 20:23
Fetch single pull request from github
In projects where I only participate in some small areas, I often want to fetch
or update just one (or few) particular pull request, without polluting my repo with the full
fetch = +refs/pull/*/head:refs/pull/origin/*
configuration. To do that, one-off command like
git fetch origin refs/pull/529/head:pr-529 -f
does the trick.
@jeroenvandijk
jeroenvandijk / Readm.md
Last active August 31, 2017 09:13
Instructions to test Logstash with Kafka

Test Logstash with Kafka

Setup Kafka

Download Kafka from:

https://www.apache.org/dyn/closer.cgi/incubator/kafka/kafka-0.7.2-incubating/kafka-0.7.2-incubating-src.tgz

Install Kafka

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: