Skip to content

Instantly share code, notes, and snippets.

if [ -n "$AWS_ACCESS_KEY" && -n "$AWS_SECRET_KEY" ]; then
echo cloud.aws.access_key: $AWS_ACCESS_KEY >> $YML
echo cloud.aws.secret_key: $AWS_SECRET_KEY >> $YML
if [ -n "$AWS_REGION" ]; then
echo cloud.aws.region: $AWS_REGION >> $YML
fi
echo discovery.type: ec2 >> $YML
fi
func pathExists(path string) bool {
_, err := os.Stat(path)
if err == nil {
return true
}
return false
}
#!/usr/bin/env ruby
MIN = 0
MAX = 65536
SINK = `pactl stat |grep "Default Sink: "`.split(" ")[2]
STEP = MAX / 16
volume = `pacmd dump | grep "set-sink-volume #{SINK}"`.split(" ")[2].to_i(16)
muted =`pacmd dump | grep "set-sink-mute #{SINK}"`.split(" ")[2] == "yes"
set $mod Mod4
focus_follows_mouse no
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# bindsym $mod+Return exec /usr/bin/rxvt
export ETCD_DISCOVERY_URL=https://gist.github.com/AndrewVos/RANDOM
systemctl start fleet
-ETCD_DISCOVERY_URL=https://discovery.etcd.io/3eea1dc4f17a141122e6098354c0b166
-START_FLEET=1
+export ETCD_DISCOVERY_URL=https://gist.github.com/AndrewVos/<RANDOM>
" mappings {{{
function! SetupMapping()
let g:mapping = input('Command: ')
endfunction
function! ExecuteMapping()
if exists("g:mapping")
execute :wa
execute "!" . g:mapping
endif
endfunction
#!/bin/bash -e
go get
go build
sudo service nginx start
prodotti_servers=`pgrep -f "prodotti server"`
if [ "$(curl -fsS localhost:9091)" == 'prodotti' ]; then
function! ExecuteMapping()
if exists("g:mapping")
execute :wa
execute "!" . g:mapping
endif
endfunction
function! SetupMapping()
let g:mapping = input('Command: ')
endfunction
{
"query":{
"function_score":{
"query":{
"bool":{
"should":[
{
"bool":{
"must":[
{