Skip to content

Instantly share code, notes, and snippets.

View julrich's full-sized avatar
🍋
squeezing!

Jonas Ulrich julrich

🍋
squeezing!
View GitHub Profile
@julrich
julrich / init-and-rollover-test.sh
Last active November 10, 2016 12:46
Index Rollover Test
Simple test case to create an index, and test the rollover api.
Should move shards to single node before starting the shrink. Unfortunately, the settings seem to be updated correctly for the index, but no relocation is taking place.
@julrich
julrich / commands.sh
Last active September 30, 2016 11:02
DNS Configuration for .local Domain on OSX El Capitan
brew install dnsmasq
mkdir -p /usr/shared/etc/
echo "address=/shared/127.0.0.1" >> /usr/local/etc/dnsmasq.conf
echo "listen-address=127.0.0.1" >> /usr/local/etc/dnsmasq.conf
sudo cp "/usr/local/Cellar/dnsmasq/*/homebrew.mxcl.dnsmasq.plist" "/Library/LaunchDaemons"
sudo launchctl load -w "/Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist"
sudo -s
sudo mkdir -p /etc/resolver
sudo echo 'nameserver 127.0.0.1' > /etc/resolver/local
dscacheutil -flushcache
var derby = require('derby');
var app = derby.createApp(module);
var get = app.get;
var view = app.view;
var ready = app.ready;
// ROUTES //
get('/projects', function (page, model, params) {
var projectsQuery = model.query('projects').withUrl();
<!--
Derby templates are similar to Handlebars, except that they are first
parsed as HTML, and there are a few extensions to make them work directly
with models. A single HTML template defines the HTML output, the event
handlers that update the model after user interaction, and the event handlers
that update the DOM when the model changes.
As in Handlebars, double curly braces output a value literally. Derby
templates add single curly braces, which output a value and set up
model <- -> view bindings for that object.
@julrich
julrich / restart_tmux
Created November 10, 2012 16:56 — forked from leh/restart_tmux
start or restore a tmux session named after your current working directory
# Switching projects like mad?
# t: start or restore a tmux session named after your current working directory
#
# e.g. calling t in /home/project/awesome_project will reattach the tmux session named
# awesome_project or create a new one
t() { tmux attach-session -t $(pwd | awk -F/ '{print $NF}') || tmux new-session -s $(pwd | awk -F/ '{print $NF}') ; }