Install Git
# Ubuntu
sudo apt-get install git
# OSX http://mac.github.com/
Create a Git repository in the current directory
# Open a terminal, `cd` to the project directory and then
git init
#!/bin/bash | |
set -e | |
monthday="$(date +%-d)" | |
weekday="$(date +%w)" | |
if [[ "$monthday" -eq 1 ]] | |
then |
name;/path/to/name |
#!/bin/bash | |
grep nrpe /var/log/audit/audit.log | audit2allow -M local | |
semodule -i local.pp |
/path/to/*.log { | |
size 10M | |
rotate 10 | |
create | |
compress | |
delaycompress | |
dateext | |
dateformat -%Y%m%d-%s | |
} |
#!/bin/bash | |
# Split URLs by comma | |
urls=${1//,/ } | |
for url in $urls | |
do | |
hostname="${url%%/*}" | |
if [[ "$url" = */* ]] | |
then |
Install Git
# Ubuntu
sudo apt-get install git
# OSX http://mac.github.com/
Create a Git repository in the current directory
# Open a terminal, `cd` to the project directory and then
git init
Change the email address to the verified sender address. By default Mutt doesn't use the envelope address, resulting in the email getting rejected because of unverified address.
set from = 'Amazing Tester <tester@amazing.com>'
set smtp_pass = 'xxx'
set smtp_url = 'smtps://xxx@email-smtp.xxx.amazonaws.com'
set use_envelope_from = yes
Add self's SSH key to another account to gain access
user=xyz
sudo mkdir -p /home/$user/.ssh
sudo cp -i ~/.ssh/authorized_keys /home/$user/.ssh/
sudo chown -R $user:$user /home/$user/.ssh
sudo chmod -R go-rwx /home/$user/.ssh
Print permissions in a way that is suitable for executing again
for i in *
do
echo chown $(stat -c%U:%G $i) $i
echo chmod $(stat -c%a $i) $i
done
Install dependencies
sudo apt-get install libdb4.2-ruby1.8 libcairo-ruby1.8
Install Philesight
git clone https://github.com/phunehehe/philesight.git