ansible: Ansible development package for Oh My Fish
apt: Short and friendly command wrapper for APT
battery: OS X and Linux compatible battery utilities
brew: Oh My Fish plugin to integrate Homebrew paths into shell.
| #curl -i -X POST -H 'Content-Type: application/json' -d '{"params": {"password": "mypassword", "user": "myuser"}, "jsonrpc": "2.0", "method": "user.authenticate"}' http://0.0.0.0/zabbix/api_jsonrpc.php | |
| require 'net/http' | |
| require 'json' | |
| def post | |
| host = '0.0.0.0' | |
| port = '80' |
| response=$(cat -) | |
| payload=$(echo $response | sed -e 's/^.*"Payload":"\([^"]*\)".*$/\1/') | |
| # action string "runme" == byte "cnVubWU=" , replace "runme" with your payload data | |
| if [ "$payload" == "cnVubWU=" ]; then | |
| logger restarting ntpd, consul triggered by payload $payload | |
| # /usr/bin/sudo /sbin/service ntpd restart | |
| else | |
| logger skipping ntpd restart, consul triggered by payload $payload | |
| fi |
| #!/usr/bin/env ruby | |
| # Generates necessary certificates to ~/.docker | |
| # | |
| # Prereq: | |
| # bundle install | |
| # OR | |
| # gem install certificate_authority | |
| # gem install fileutils | |
| # Usage: | |
| # ruby certgen.rb <domain> |
| docker-machine create \ | |
| --driver=digitalocean \ | |
| --digitalocean-access-token=$DO_TOKEN \ | |
| --digitalocean-size=512mb \ | |
| --digitalocean-region=nyc3 \ | |
| --digitalocean-private-networking=true \ | |
| --digitalocean-image=ubuntu-15-04-x64 \ | |
| docker-swarm-kv-store | |
| docker $(docker-machine config docker-swarm-kv-store) run -d \ |
| ## | |
| # Just found the amazing builtin 'mapfile', perfect | |
| # for substitution variable inside a file by its values. | |
| ## | |
| mateus@mateus:/tmp$ cat input.txt | |
| a = $a | |
| b = $b | |
| mateus@mateus:/tmp$ echo a=$a, b=$b | |
| a=1, b=2 |
| # -*- coding: utf-8 -*- | |
| """Proof of concept to use saltstack's pure modules and states with fabric:: | |
| fab list_packages print_specs -H <ip> --user=<user> | |
| On my vagrant environment: | |
| fab list_packages print_specs -H <ip> --password=vagrant --user=vagrant | |
| """ |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Tool for commands execution over clusters | |
| """ | |
| import os, sys, logging, urllib | |
| import argparse | |
| import threading |
| With Release 3.0, contrail-heat resources/templates are being auto-generated from the Schema. | |
| The generated resources/templates are part of the python-contrail package and located in | |
| /usr/lib/python2.7/dist-packages/vnc_api/gen/heat/ directory. This directory has three sub-directories | |
| 1. resources/ | |
| This sub-directory contains all the resources for the contrail-heat plugin. It runs in the context | |
| of the heat-engine service. | |
| 2. templates/ | |
| This sub-directory contains template for each resource. They are sample templates with every possible |