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
# | |
# Local | |
# | |
git tag -d TAG_NAME | |
git branch -d BRANCH_NAME | |
# | |
# Remote | |
# | |
git push origin :TAG_NAME |
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 | |
# a simple script to uninstall ossec (tested on debian) | |
# Author: Han The Thanh <h a n t h e t h a n h @ g m a i l . c o m> | |
# Public domain. | |
# this script has been tested on debian; it should also work on other linux | |
# systems but I have not tested. If you want to be careful and need to see what | |
# would be done without executing any real action, uncomment the following line: | |
# dryrun="echo " |
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
# | |
# According to AWS Docs - http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html | |
# | |
# Rewrites all sender addresses to a single canonical ses verified address. | |
# | |
# Expects a vars files at ../vars/PostfixSES-vars.yml with the following variables: | |
# - ses_host: email-smtp.us-west-x.amazonaws.com | |
# - ses_port: 587 | |
# - ses_username: ses-smtp-username | |
# - ses_password: ses-smtp-password |
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
RewriteEngine on | |
# | |
# If the request comes in on the domain cname, redirect to domain root | |
# | |
RewriteCond %{HTTP_HOST} ^www\.domain1\.com$ [NC] | |
RewriteCond %{HTTP_HOST} !^$ | |
RewriteRule ^/?(.*) http://domain1.com/$1 [L,R=301,NE,NC] | |
RewriteCond %{HTTP_HOST} ^www\.domain2\.com$ [NC] | |
RewriteCond %{HTTP_HOST} !^$ | |
RewriteRule ^/?(.*) http://domain2.com/$1 [L,R=301,NE,NC] |
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
# | |
# Delete Ansible retry files | |
# | |
5 * * * * /usr/bin/find /Users/user/. -maxdepth 1 -type f -name \*.retry -exec rm {} \; > /dev/null 2>&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
function gpack() { | |
if [ -d ".git" ]; then | |
echo -n "List of files:" ; git show --pretty="format:" --name-only $1 | |
if [ $? == 0 ]; then | |
git show --pretty="format:" --name-only $1 | xargs tar czf ../`printf '%q\n' "${PWD##*/}"`-partial-`cdate`.tar.gz | |
echo ; echo -n "Tar bundle: ../" ; ls -1t .. | head -n 1 | |
else | |
echo "git SHA Not Found" | |
fi | |
else |
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
--- | |
- hosts: all | |
gather_facts: true | |
name: CVE-2014-6271 - Bash Fix with Debian 6 Support | |
tasks: | |
- name: Add LTS to sources.list | |
lineinfile: > | |
dest=/etc/apt/sources.list | |
insertafter=EOF |
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 | |
awk '{ print $1 } ' access.log | uniq -c | sort |
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 --list | grep "^rc" | cut -d " " -f 3 | xargs apt-get autoremove --purge -y |
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
- hosts: bacula | |
user: user | |
sudo: True | |
tasks: | |
- name: Restore files from bacula for weekly restore tests | |
shell: /bin/echo "restore before=2013-10-14\ 08:00:00 client={{ item }}-fd restoreclient={{ item }}-fd file=</tmp/{{ item }}-file-list where=/tmp/bacula-restores yes" | /usr/bin/bconsole | |
with_items: | |
- hostname1 | |
- hostname2 |
NewerOlder