http://www.fontpalace.com/font-details/Consolas/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "github.com/go-gorp/gorp" | |
| _ "github.com/mattn/go-sqlite3" | |
| "golang.org/x/net/websocket" | |
| "log" | |
| "net/http" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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/'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| 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 |
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:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" | |
OlderNewer