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/sh | |
set -e | |
case "$1" in | |
configure|reconfigure) | |
;; | |
*) | |
adduser --system --disabled-password --disabled-login --home /nonexistent \ | |
--no-create-home --quiet --force-badname --group _serf |
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/sh | |
SERFDIR="${SERFDIR:-/etc/serf}" | |
# Dispatch an event to the appropriate handlers. | |
# | |
# $ tree /etc/serf | |
# /etc/serf | |
# └── handlers | |
# ├── member-failed |
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/zsh | |
# Use a dedicated network namespace to build and test firewall rules | |
# before applying them. | |
set -e | |
zparseopts -D n=dryrun -dry-run=dryrun t=trace -trace=trace f=iptables | |
[[ -n $trace ]] && setopt xtrace | |
[[ -z $iptables ]] && { |
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
[Unit] | |
Description = XBMC Media Center | |
After = remote-fs.target | |
After = syslog.target | |
[Service] | |
User = xbmc | |
Group = xbmc | |
Type = simple | |
Restart = always |
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
[Unit] | |
Description = dhclient on %I | |
Wants = network.target | |
Before = network.target | |
BindsTo = sys-subsystem-net-devices-%i.device | |
After = sys-subsystem-net-devices-%i.device | |
[Service] | |
Type = forking | |
PIDFile = /run/dhclient-%I.pid |
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/zsh | |
include=() | |
exclude=() | |
for exc in $(grep '^ignore = Name ' ~/.unison/home.prf | awk '{print $NF}'); do | |
exclude=($exclude --exclude='**'/$exc) | |
done | |
for exc in $(grep '^ignore = Path ' ~/.unison/home.prf | awk '{print $NF}'); do | |
exclude=($exclude --exclude=$HOME/$exc) | |
done |
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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"s3:DeleteObject", | |
"s3:PutObject", | |
"s3:ListBucket" | |
], | |
"Effect": "Allow", | |
"Resource": [ "arn:aws:s3:::bucketname/*", "arn:aws:s3:::bucketname" ], |
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
input { | |
elasticsearch { | |
host => "..." | |
codec => "oldlogstashjson" | |
query => "NOT _exists_:@version" | |
} | |
} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | |
<!-- ... --> | |
</head> | |
<body ped-scrolling="forbid"> | |
<!-- ... --> |
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
# To be run with "python -m unittest -v socketpair" | |
import socket | |
import os | |
import select | |
import unittest | |
class TestUnixSocket(unittest.TestCase): | |
def check_socket(self, socktype): |
OlderNewer