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
aws acm list-certificates --profile=<profile_name> |
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
openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096 |
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
# | |
#/etc/nginx/sites_available/rails_app | |
# | |
upstream rails_app { | |
server unix:///home/deployer/apps/rails_app/shared/tmp/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80; |
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 | |
for listfile in /var/lib/dpkg/info/*.list.broken; do | |
#echo ${listfile##*/} | |
listfilename=$(basename -- "$listfile") | |
listfilename="${listfilename%.*}" | |
echo "list file name: ${listfilename}" | |
if [ -f "/var/lib/dpkg/info/${listfilename}" ]; then | |
output=$(file "/var/lib/dpkg/info/${listfilename}" | awk '{print $2}') | |
echo $output | |
#break |
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 | |
for listfile in /var/lib/dpkg/info/*.list; do | |
listfilename=$(basename -- "$listfile") | |
listfilename="${listfilename%.*}" | |
echo ${listfilename} | |
#break | |
output=$(file ${listfile}| awk '{print $2}') | |
#echo "${output}" | |
if [[ $output == *"data"* ]]; then | |
echo "${listfile} is DATA!" |
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
git rev-parse --short HEAD |
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
class Data | |
class << self | |
def all | |
(1..10).to_a | |
end | |
def created | |
[4, 5, 6, 8, 9] |
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
#found here: https://stackoverflow.com/a/22540192/1488217 | |
# comment out the original line | |
# [ -z "$PS1" ] && return | |
if [ -z "$PS1" ]; then | |
shopt -s expand_aliases | |
# alias ls='ls --color=always' | |
# return | |
fi |
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 -e | |
# found here: https://notes.tweakblogs.net/blog/7955/using-netcat-to-build-a-simple-tcp-proxy-in-linux.html | |
if [ $# != 3 ] | |
then | |
echo "usage: $0 <src-port> <dst-host> <dst-port>" | |
exit 0 | |
fi |
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
cat log/capistrano.log | egrep "^.+Command:\s(.+)$" | cut -d : -f 2 > log/capistrano_deploy_commands.log |