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
/* eslint no-inline-comments:0, no-magic-numbers:0 */ | |
module.exports = { | |
'env': { | |
'node': true, | |
'es6': true, | |
}, | |
'ecmaFeatures': { |
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/bash | |
####################################################################### | |
# this is a helper script that keeps SnapRAID parity info in sync with | |
# your data. Here's how it works: | |
# 1) it first calls diff to figure out if the parity info is out of sync | |
# 2) if there are changed files (i.e. new, changed, moved or removed), | |
# it then checks how many files were removed. | |
# 3) if the deleted files exceed X (configurable), it triggers an | |
# alert email and stops. (in case of accidental deletions) | |
# 4) otherwise, it will call sync. |
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
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
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 | |
# Cleanup docker files: untagged containers and images. | |
# | |
# Use `docker-cleanup -n` for a dry run to see what would be deleted. | |
untagged_containers() { | |
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1. | |
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6). | |
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470 | |
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}' |
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
[Background] | |
Color=40,40,40 | |
[BackgroundIntense] | |
Color=40,40,40 | |
[Color0] | |
Color=73,72,62 | |
[Color0Intense] |
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
/* Adjusted to give override background and text colour */ | |
.highlight pre, pre, .highlight .hll { | |
background-color: #49483E; | |
border: 1px solid #ccc; | |
padding: 6px 10px; | |
border-radius: 3px; | |
color: #FFFFFF; | |
} | |
.gist pre { |
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=BubbleUPnP Server | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
Type=simple | |
Environment=DEFAULTFILE=/etc/default/bubbleupnpserver | |
Restart=on-failure | |
ExecStartPre=/usr/share/bubbleupnpserver/startService.sh |
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
(''+(+'⇹')).repeat(8) + ' BATMAN!' |
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
#! /usr/bin/env python3.5 | |
""" | |
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5. | |
This version is adapted to work on ubuntu 16.10 | |
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197 | |
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone. |
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/bash | |
mkdir -p /etc/systemd/system/docker.service.d | |
cat <<EOF > /etc/systemd/system/docker.service.d/override.conf | |
[Service] | |
ExecStart= | |
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 | |
EOF | |
sudo systemctl daemon-reload | |
sudo service docker restart |
OlderNewer