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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
# Make sure you have a recent version: the code points that Powerline |
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
FROM node:current-alpine | |
EXPOSE 1234 | |
WORKDIR /home/node/app | |
RUN apk --no-cache add git \ | |
&& chown node:node /home/node/app | |
USER node |
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
# assumes .mkv media format and existing subtitles end in .en.srt | |
for f in ./*.mkv; do media=$(basename -s .mkv ${f}); $(ffs ${media}.mkv -i ${media}.en.srt --overwrite-input); done | |
# improved version that handles directory recursion | |
find . -type f -name '*.mkv' -print0 | while IFS= read -r -d '' file; do episode=$(echo -en ${file} | sed 's/\.[^.]*$//'); echo -en ${episode}; done |
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
# This is Git's per-user configuration file. | |
[user] | |
# Please adapt and uncomment the following lines: | |
name = Doug Dimick | |
email = [email protected] |
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 re | |
## https://tools.ietf.org/html/rfc3912 | |
def whois_request(domain, server, port=43): | |
_sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
_sock.connect((server, port)) | |
_sock.send(domain.encode('utf-8')) | |
_result="" | |
while True: |
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 | |
# | |
# Query NUT UPS status and output in InfluxDB Line Protocol | |
# | |
# Usage: ups.sh upsname[@hostname[:port]] | |
# (same as `upsc`, see https://networkupstools.org/docs/man/upsc.html) | |
# Sample telegraf.conf config snippet. | |
#[[inputs.exec]] | |
# commands = [ |
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
#!/usr/bin/env python | |
# Runs '/sbin/zpool list -Hp' and outputs an InfluxDB-compatible JSON array. Use with telegraf inputs.exec. | |
# Sample telegraf.conf config snippet. | |
# [[inputs.exec]] | |
# commands = [ | |
# "/usr/local/bin/zpool_list.py" | |
# ] | |
# data_format = "influx" |