This file contains 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
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 |
This file contains 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
func pathExists(path string) bool { | |
_, err := os.Stat(path) | |
if err == nil { | |
return true | |
} | |
return false | |
} |
This file contains 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 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" |
This file contains 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
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 |
This file contains 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
export ETCD_DISCOVERY_URL=https://gist.github.com/AndrewVos/RANDOM | |
systemctl start fleet |
This file contains 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
-ETCD_DISCOVERY_URL=https://discovery.etcd.io/3eea1dc4f17a141122e6098354c0b166 | |
-START_FLEET=1 | |
+export ETCD_DISCOVERY_URL=https://gist.github.com/AndrewVos/<RANDOM> |
This file contains 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
" mappings {{{ | |
function! SetupMapping() | |
let g:mapping = input('Command: ') | |
endfunction | |
function! ExecuteMapping() | |
if exists("g:mapping") | |
execute :wa | |
execute "!" . g:mapping | |
endif | |
endfunction |
This file contains 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/bash -e | |
go get | |
go build | |
sudo service nginx start | |
prodotti_servers=`pgrep -f "prodotti server"` | |
if [ "$(curl -fsS localhost:9091)" == 'prodotti' ]; then |
This file contains 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! ExecuteMapping() | |
if exists("g:mapping") | |
execute :wa | |
execute "!" . g:mapping | |
endif | |
endfunction | |
function! SetupMapping() | |
let g:mapping = input('Command: ') | |
endfunction |
This file contains 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
{ | |
"query":{ | |
"function_score":{ | |
"query":{ | |
"bool":{ | |
"should":[ | |
{ | |
"bool":{ | |
"must":[ | |
{ |