Skip to content

Instantly share code, notes, and snippets.

## Create a directory for FTPSITE
directory 'C:\\website' do
action :create
recursive true
mode '0755'
end
## creates a new app pool
from fabric.api import task, lcd, local, env, sudo
from fabric.contrib.project import rsync_project
#################################################
# Globals
env.port = 13412
env.use_ssh_config = True
env.disable_known_hosts = True
@misteritguru
misteritguru / backup
Last active August 29, 2015 14:10 — forked from sajanp/backup
#!/bin/bash
DATE=$(date +"%m-%d-%Y")
DATABASES=`mysql -e "SHOW DATABASES" | tr -d "| " | grep -Ev 'Database|information_schema|performance_schema|mysql'`
echo "Dumping Databases"
for db in $DATABASES
do
echo "========================"
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'