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
UnsafeUserParameters=1 | |
Timeout=10 | |
UserParameter=apt.available.updates,updates=$(/usr/lib/update-notifier/apt-check 2>&1);echo $updates | cut -d ";" -f 1 | |
UserParameter=apt.security.updates,updates=$(/usr/lib/update-notifier/apt-check 2>&1);echo $updates | cut -d ";" -f 2 |
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
switch: | |
- platform: mqtt | |
name: "Firealarm strobe" | |
state_topic: "node/gzl/strobe" | |
command_topic: "node/gzl/strobe/set" | |
payload_off: 0 | |
payload_on: 1 | |
- platform: mqtt | |
name: "Firealarm buzzer" | |
state_topic: "node/gzl/buzzer" |
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
<?php | |
namespace App\Console\Commands; | |
use Elasticsearch\ClientBuilder; | |
use Illuminate\Console\Command; | |
class ElasticRecreateIndex extends Command | |
{ | |
/** |
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
# Fail2Ban filter for openssh | |
# | |
[INCLUDES] | |
# Read common prefixes. If any customizations available -- read them from | |
# common.local | |
before = common.conf | |
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
# Sync folders, follow symlinks, don't store FS attributes | |
s3cmd sync -F --no-preserve origin/ s3://bucket/ | |
# Sync folders recursivly, delete remote objects with no corresponding local file | |
s3cmd sync -r --delete-removed assets/ s3://bucket/assets/ | |
# Add header to single file on bucket | |
s3cmd modify -r --add-header=Cache-Control:max-age=0 s3://bucket/index.html | |
# Remove header from all files in folder (or on bucket) |
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
# Setup var defaults | |
set $no_cache ""; | |
# If non GET/HEAD, don't cache & mark user as uncacheable for X second(s) via cookie | |
if ($request_method !~ ^(GET|HEAD)$) { | |
set $no_cache "1"; | |
} | |
# Drop no cache cookie if need be (for some reason, add_header fails if included in prior if-block) | |
if ($no_cache = "1") { |
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 | |
USER="backup" | |
PASSWORD="password" | |
OUTPUT="/output/folder" | |
BUCKET="backup-bucket" | |
databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` | |
for db in $databases; do |
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
# Laravel queue worker using systemd | |
# ---------------------------------- | |
# | |
# /lib/systemd/system/queue.service | |
# | |
# run this command to enable service: | |
# systemctl enable queue.service | |
[Unit] | |
Description=Laravel queue worker |