This file contains 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
import csv | |
import requests | |
import json | |
import time | |
import socket | |
# Set up the URL for the IP-API.com API endpoint | |
api_url = "http://ip-api.com/batch" | |
# Set up the fields to request from the API |
This file contains 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/sh | |
if [ -z "$1" ] | |
then | |
echo "No bucketname supplied." | |
exit 1 | |
fi | |
if [ -z "$2" ] | |
then | |
echo "No prefix supplied (example 360/jkloxsuc/)." |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
if [ ! -f infinite-uploads.php ]; then | |
echo 'This script must be run from the repository root.' | |
exit 1 | |
fi | |
for PROG in composer find sed unzip |
This file contains 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 | |
if [ -z "$1" ] | |
then | |
echo "Missing API Key argument!" | |
exit 1 | |
fi | |
if [ -z "$2" ] | |
then | |
echo "Missing source domain!" |
This file contains 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 | |
FILENAME=`find . -type f -name "*.pot"` | |
if [[ -z "$FILENAME" ]] ; then | |
TEXTDOMAIN=`grep -m 1 --include=*.php "^Textdomain" * | awk -F' ' '{print $2}' | sed 's/[[:space:]]//g'` | |
if [[ -z "$TEXTDOMAIN" ]] ; then | |
echo "Please enter the textdomain:" | |
read TEXTDOMAIN | |
fi | |
This file contains 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 | |
FOLDER1='/somepath/wp-content/uploads/' | |
FOLDER2='/somepath/wp-content/uploads/' | |
#pngs | |
for i in `find $FOLDER1 $FOLDER2 -mmin -1 -iname '*.png'` | |
do | |
BEFORE_SIZE=$(stat -c%s "$i") | |
optipng -o2 -preserve -quiet $i | |
AFTER_SIZE=$(stat -c%s "$i") |
This file contains 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 | |
if [[ $# -eq 0 ]] ; then | |
echo "Please enter a version number:" | |
read VERSION | |
else | |
VERSION=$1 | |
fi | |
if [[ -z "$VERSION" ]] ; then | |
echo "Sorry, I need a version number!" |