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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/", | |
"Mappings" : { | |
"RegionMap" : { | |
"eu-central-1" : { | |
"AMI" : "ami-487d4d55" | |
}, |
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
ExecStart=/usr/bin/bash -c '/usr/bin/docker kill $(/usr/bin/docker ps -aq —filter="name=containername") || true' |
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=Demonstrate Bash | |
[Service] | |
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))" | |
ExecStart=/usr/bin/ech "2 + 2 = ${MYVAR}" |
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 | |
#Variables | |
MySQLUser="root" | |
TIMESTAMP=$(date +"%Y-%m-%d-%H-%M") | |
LOGDIR= | |
LOGFILE= | |
FILENAME=backup_$TIMESTAMP.sql.gz | |
# export database |
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
require 'rubygems' | |
require 'chef/encrypted_data_bag_item' | |
secret = Chef::EncryptedDataBagItem.load_secret('chef_secret') | |
data = {"id" => "name_of_secret_goes_here", "key" => 'secret_goes_here'} | |
encrypted_data = Chef::EncryptedDataBagItem.encrypt_data_bag_item(data, secret) | |
FileUtils.mkpath('data_bags/passwords') | |
File.open('data_bags/passwords/name_of_secret_goes_here.json', 'w') do |f| | |
f.print encrypted_data.to_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
settings { | |
logfile = "/var/log/lsyncd/lsyncd.log", | |
statusFile = "/var/log/lsyncd/lsyncd.status" | |
} | |
sync { | |
default.rsyncssh, | |
source = "/sites/", | |
host = "x.x.x.x", | |
targetdir = "/sites/", | |
exclude = {"*.bak" , "*.tmp" , "*.log" }, |
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
iptables -A INPUT -p tcp --dport 3306 -i eth0 -j DROP |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetBucketLocation", | |
"s3:ListBucket" | |
], | |
"Resource": [ |
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": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:Get*", | |
"s3:List*" | |
], | |
"Resource": [ | |
"arn:aws:s3:::BUCKET", |
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
ffmpeg -i audioinput.mp3 -loop 1 -i backgroundpic.png -filter_complex "[0:a]channelsplit[a1][a2];[a1]showwaves=s=960x270:mode=p2p:rate=15,format=yuv420p,colorbalance=gs=0.49,colorbalance=bs=0.34,colorbalance=rm=1,colorbalance=gm=1,colorbalance=bm=1,scale=1920x540[bottom];[1:v][bottom]overlay=shortest=1:main_h/2[vid]" -map "[a2]" -c:a /dev/null -map "[vid]" -map 0:a -codec:v libx264 -crf 18 -tune animation -preset fast -r 15 -codec:a aac -strict -2 -b:a 192k output.mp4 |
OlderNewer