I hereby claim:
- I am aaronott on github.
- I am aaronott (https://keybase.io/aaronott) on keybase.
- I have a public key whose fingerprint is FFA3 8675 F349 D340 87C1 76C8 6940 15D1 2B44 AF03
To claim this, I am signing this object:
for t in `drush sqlq 'show tables like "cache%"'`; do `drush sqlq "truncate $t"`; done |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
SOURCEDIR=/path/to/docroot | |
DESTDIR=/path/to/backup/dir | |
NAME=<site-name> | |
RETENTION=2 | |
let MMIN=($RETENTION*60*24)-180 | |
DATE=`date +%Y-%m-%d-%H-%M` | |
EXCLUDE="" |
#!/bin/sh | |
DBNAME=<database> | |
DBUSER=<dbuser> | |
DBPASS=<good-strong-password?> | |
DBHOST=localhost | |
DESTDIR=/path/to/backup/dir | |
NAME=<site-name> | |
RETENTION=2 | |
let MMIN=($RETENTION*60*24)-30 |
<?php | |
$max_num_links = 7; | |
$page = "/"; | |
if (isset($_SERVER['REQUEST_URI'])) { | |
$page = htmlentities(rtrim($_SERVER['REQUEST_URI'], "/")); | |
} | |
?> | |
<h1>Hidden links</h1> | |
<h2><?php echo $page; ?></h2> |
#!/bin/bash | |
DIARY_DIR=~/Documents/.diary | |
PAGE_NAME="$(date +'%F')-$(date +'%a' | head -c 1)-log.md" | |
vi $DIARY_DIR/$PAGE_NAME |
#!/usr/bin/env drush | |
<?php | |
/** | |
* This script removes all drupal users with no roles other than authenticated | |
* user assigned. | |
* | |
* This is useful in the case where a site's only users are admin or some | |
* other higher level role. | |
* | |
* Make sure to back up the database prior to running this as this cannot be |
#!/usr/bin/env python | |
import csv | |
import sys | |
if len(sys.argv) < 2 : | |
sys.exit('Usage: %s <csv file>' % sys.argv[0]) | |
with open(sys.argv[1], 'r') as csvfile: | |
reader = csv.reader(csvfile) |
#!/bin/bash | |
for f in *.docx; do if [[ $(unzip -p $f | grep -l "$1") ]] ; then echo "$f contains a match"; fi ; done |
#!/bin/bash | |
tst=$1 | |
for dom in $(curl -s https://crt.sh/?q=%25.${tst} | grep ${tst} |grep TD |grep -v LIKE |cut -d">" -f2 | cut -d"<" -f1 |sort |uniq); | |
do | |
ip=$(ping -c 1 $dom | gawk -F'[()]' '/PING/{print $2}') ; echo "${dom} (${ip})" >> ${tst}_w_IP.txt ; | |
done |