start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/sh | |
function usage { | |
echo "This script creates a folder containing all linked ![images]()" | |
echo "of a Markdown file -- even linked ones from the Internet." | |
echo "" | |
echo "It takes one argument: the file it should process." | |
echo | |
echo "When a file argument is present, it creates a new folder for:" | |
echo "a) the Markdown file" |
#!/bin/bash | |
url=http://redefininggod.com | |
webarchive=https://web.archive.org | |
wget="wget -e robots=off -nv" | |
tab="$(printf '\t')" | |
additional_url=url.list | |
# Construct listing.txt from url.list | |
# The list of archived pages, including some wildcard url |
# Be sure to change or omit the --network parameter; it defaults to 1. | |
wp site list --network=4 --field=url | while read line; do wp theme list --status=active --field=name --url=$line >> /tmp/wpcli-themes.txt; done && sort /tmp/wpcli-themes.txt | uniq -c |
/** | |
* Utility function to check if a gravatar exists for a given email or id | |
* @param int|string|object $id_or_email A user ID, email address, or comment object | |
* @return bool if the gravatar exists or not | |
*/ | |
function validate_gravatar($id_or_email) { | |
//id or email code borrowed from wp-includes/pluggable.php | |
$email = ''; |
#!/usr/bin/env sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |
#!/bin/bash | |
# | |
# This script requires xpath to parse part of the dnscurl.pl output | |
# on CentOS/RedHat/Amazon Linux: | |
# | |
# sudo yum install perl-XML-XPath | |
# | |
# also, dnscurl.pl (from http://aws.amazon.com/code/Amazon-Route-53/9706686376855511) | |
# expects your secrets to be in ~/.aws-secrets | |
# using a file format like this (from http://dmz.us/wp/wp-content/uploads/r53/aws-secrets.txt) |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |