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
$ dpkg --get-selections | |
accountsservice install | |
acpid install | |
adduser install | |
apparmor install | |
apport install | |
apport-symptoms install | |
apt install | |
apt-transport-https install | |
apt-utils install |
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
git cat-file -p $commit_id | |
git cat-file -p $tree_id | |
git cat-file -p $sub_tree_id | |
#git cat-file -p $sub_sub_tree_id | |
git cat-file blob $blob_id >rawblob |
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
file { '/opt/somedir': | |
source => 'puppet:///modules/mymodule/somedir', | |
recurse => true, | |
} | |
exec { 'runsomething': | |
command => '/opt/somedir/something.sh', | |
require => File['/opt/somedir'], | |
} |
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
sub vcl_deliver { | |
set resp.http.Public-Key-Pins = {"pin-sha256="JcGyEMpuXl20IZG7NP8AFuLozlUZEoiENiuoelCVVaM="; pin-sha256="nh/TNmYDfa77LDPF0AfqxYcq0zLIgsIQSyGqj1MwzD4="; pin-sha256="cm5Kw3idmwUbZOGh20sAPAQq31Oyiaot7BJPH3iTN78="; max-age=5184000;"}; | |
} |
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
sub vcl_deliver { | |
set resp.http.Strict-Transport-Security = "max-age=31536000"; | |
} |
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
sub vcl_recv { | |
if ( req.http.X-Forwarded-Proto !~ "(?i)https") { | |
return (synth(750, "")); | |
} | |
} | |
sub vcl_synth { | |
if (resp.status == 750) { | |
set resp.status = 301; | |
set resp.http.Location = "https://blog.stangroome.com" + req.url; |
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 | |
# for when a Cron job fails on Ubuntu with "(No MTA installed, discarding output)" | |
# captures the job output to syslog instead | |
exec 1> >(/usr/bin/logger --id --tag sendmail-to-syslog --priority mail.notice) 2>&1 | |
echo $ sendmail "$@" | |
exec cat |
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
sudo docker run --rm imagebase /usr/bin/find / -printf '%s\t%p\n' | sort -k2 >/tmp/imagebase | |
sudo docker run --rm imagenext /usr/bin/find / -printf '%s\t%p\n' | sort -k2 >/tmp/imagenext | |
# list removed files by size | |
diff -u /tmp/imagebase /tmp/imagenext | grep '^-' | cut -c 2- | sort -n | |
# list added files by size | |
diff -u /tmp/imagebase /tmp/imagenext | grep '^+' | cut -c 2- | sort -n | |
# list removals and adds by size |
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 -xe | |
sudo apt-get install python-pip python-dev libffi-dev libssl-dev | |
sudo pip install six cryptography pathod |
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
[ಠ_ಠ] | |
[AttributeUsage(System.AttributeTargets.All, AllowMultiple = true, Inherited = true)] | |
public class ಠ_ಠAttribute : Attribute | |
{ | |
public ILog Log { get; set; } | |
public ಠ_ಠAttribute() | |
{ | |
Log.Info("This code is bad and you should feel bad"); | |
} |