- zeromq: stable 3.2.2
- go: 1.0.3
- gozmq: zmq_3_x
- python: 2.7.3
- pyzmq: 13.0.2
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
import logging | |
import os | |
import time | |
import traceback | |
from watchdog.observers import Observer | |
from watchdog.events import PatternMatchingEventHandler | |
MAP_DATA_DIR = "/tmp/foo" |
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
cutbuffer () { | |
emulate -L zsh | |
zle kill-region | |
zle set-mark-command -n -1 | |
killring=("$CUTBUFFER" "${(@)killring[1,-2]}") | |
if which clipcopy &>/dev/null; then | |
printf "%s" "$CUTBUFFER" | clipcopy | |
else | |
echo "clipcopy function not found. Please make sure you have Oh My Zsh installed correctly." |
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
-- create a separate schema to hold our history table | |
CREATE SCHEMA IF NOT EXISTS logging; | |
CREATE TABLE IF NOT EXISTS logging.t_history ( | |
id serial, | |
tstamp timestamp DEFAULT now(), | |
schemaname text, | |
tabname text, | |
operation text, | |
who text DEFAULT current_user, | |
new_val json, |
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
# test as follows: | |
# 1. start logstash: | |
# logstash -f ~/logstash.conf --config.reload.automatic | |
# 2. send it data: | |
# echo '{"container": "/spiff", "bleh": "blah"}' | nc localhost 6060 | |
input { | |
tcp { |
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
UNAME := $(shell uname) | |
### | |
# | |
# assuming a yaml like this: | |
# main: | |
# device: 21 | |
# | |
### |
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 some defaults | |
(setq my-font-name "monospace") | |
(setq my-font-size 10) | |
;; this method seems to work on gui systems only | |
(when window-system | |
(if (eq system-type 'darwin) | |
(setq my-font-name "Meslo")) | |
(if (eq system-type 'gnu/linux) | |
(setq my-font-name "FiraCode")) |
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
def dict_generator(indict, pre=None): | |
pre = pre[:] if pre else [] | |
if isinstance(indict, dict): | |
for key, value in indict.items(): | |
if isinstance(value, dict): | |
for d in dict_generator(value, pre + [key]): | |
yield d | |
elif isinstance(value, list) or isinstance(value, tuple): | |
for v in value: | |
for d in dict_generator(v, pre + [key]): |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file. Create a file called .gitignore
in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.
git config --global core.excludesfile ~/.gitignore
git config --global core.excludesfile %USERPROFILE%\.gitignore
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
## service.conf | |
# skel ref: https://github.com/Supervisor/supervisor/blob/master/supervisor/skel/sample.conf | |
# requires: | |
# pip install supervisor | |
# pip install supervisord-dependent-startup | |
[supervisord] |