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/bash | |
echo "Setting up new flask package layout" | |
echo -n "Application name: "; read APPNAME | |
if [ "x$APPNAME" != "x" ]; then | |
cd ~ | |
HOME=`echo $HOME` |
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
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# quick pane cycling | |
unbind ^A | |
bind ^A select-pane -t :.+ | |
# enable activity alerts | |
setw -g monitor-activity on |
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
import socket | |
import time | |
from functools import wraps | |
import bernhard | |
import sys | |
def wrap_riemann(metric, _host, client=bernhard.Client(), tags=['python']): | |
def riemann_decorator(f): | |
@wraps(f) |
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
; -*- mode: clojure; -*- | |
; vim: filetype=clojure | |
; (logging/init {:console false}) | |
(logging/init :file "riemann.log") | |
; Listen on the local interface over TCP (5555), UDP (5555), and websockets | |
; (5556) | |
(let [host "0.0.0.0"] | |
(tcp-server {:host host}) |
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
/* | |
statsrv is a very simple static file server in go using the defaul net/http package | |
Usage: | |
-p 8080 port to serve on | |
-d /var/tmp/stats the directory of static files to host | |
Go to http://localhost:8080 - it will display the index.html or directory listing file. | |
Place any .json file and it will be served as application/json type document. :) |
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 ( | |
"encoding/json" | |
"net/http" | |
consul "github.com/hashicorp/consul/api" | |
) | |
func getKVdata() *consul.KVPair { |
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
[{ | |
"name": "endpoint1", | |
"endpoint": "https://endpoint-1.example.com" | |
}, | |
{ | |
"name": "endpoint2", | |
"endpoint": "https://endpoint-2.example.com" | |
}, | |
{ | |
"name": "endpoint3", |
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
[ | |
{{ range $name, $endpoint := $endpoints }} | |
{ | |
"$name": "$endpoint", | |
}, | |
{{ end }} | |
] |
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 ( | |
"encoding/json" | |
"os" | |
"reflect" | |
"text/template" | |
) |
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
func renderFile(d *schema.ResourceData) (string, error) { | |
var err error | |
tf := template.FuncMap{ | |
"isInt": func(i interface{}) bool { | |
v := reflect.ValueOf(i) | |
switch v.Kind() { | |
case reflect.Int, reflect.Int8, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64: | |
return true |
OlderNewer