I hereby claim:
- I am dohq on github.
- I am dohq (https://keybase.io/dohq) on keybase.
- I have a public key ASAsJeIJ-_WbIfQGFoewCcqG1xr-OZljcqYCZfVZUPm75Ao
To claim this, I am signing this object:
#!/bin/sh | |
# /etc/libvirt/hooks/qemu.d/windows10/prepare/begin/isolate_cpu.sh | |
GUEST_NAME="$1" | |
GUEST_ACTION="$2/$3" | |
ALLOWED_CPUS="0-7,16-23" | |
ALL_CPUS="0-31" | |
function fzf-ssh-consul () { | |
local selected_host=$(consul catalog nodes | grep -v "DC" | awk '{print $1}' | fzf --query "$LBUFFER" --prompt="Consul Nodes SSH Remote > ") | |
if [ -n "$selected_host" ]; then | |
BUFFER="ssh ${selected_host}.node.consul" | |
zle accept-line | |
fi | |
zle reset-prompt | |
} |
I hereby claim:
To claim this, I am signing this object:
--- | |
all: | |
children: | |
datanode: | |
hosts: | |
es1: | |
ansible_host: 192.168.33.31 | |
ansible_ssh_private_key_file: ./.vagrant/machines/es1/libvirt/private_key | |
es2: | |
ansible_host: 192.168.33.32 |
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
create () { | |
if [[ $1 == "d" ]]; then | |
if [ ! -d $2 ]; then mkdir $2; echo "make dir $2"; fi | |
elif [[ $1 == "y" ]]; then | |
if [ ! -f $2 ]; then touch $2; echo "---" >> $2; echo "make yaml $2"; fi | |
fi |
# from http://ezprompt.net/ | |
function nonzero_return() { | |
RETVAL=$? | |
[ $RETVAL -ne 0 ] && echo "$RETVAL" | |
} | |
# from http://ezprompt.net/ | |
# get current branch in git repo | |
function parse_git_branch() { | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` |
package main | |
import ( | |
"database/sql" | |
"fmt" | |
"github.com/go-gorp/gorp" | |
_ "github.com/mattn/go-sqlite3" | |
"golang.org/x/net/websocket" | |
"log" | |
"net/http" |
def parse_datetime(d): | |
""" | |
Datetime parser | |
Creates datetimes from input into format yyyy-mm-dd hh:mm:ss | |
Needs proper validation! | |
Should accept following: | |
yyyy |
setopt hist_ignore_all_dups | |
function fzf-history() { | |
BUFFER=$(history -n -r 1 | fzf --no-sort +m --query "$LBUFFER" --prompt="History > ") | |
CURSOR=$#BUFFER | |
zle clear-screen | |
} | |
zle -N fzf-history | |
bindkey '^r' fzf-history |