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 python | |
# requires optipng library | |
import os,optparse | |
parser = optparse.OptionParser() | |
parser.add_option('--file', '-f', default=False, help="The file to optimize. Omit to optimize all pngs in the current directory.") | |
parser.add_option('--optimization', '-o', default=7, help="The optimatization level to run. Defaults to 7.") | |
options,args = parser.parse_args() |
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
/* | |
Auto-version CSS & JS files, allowing for cache busting when these files are changed. | |
Place in functions.php or wherever you are enqueueing your scripts & styles | |
Avoids using query strings which prevent proxy caching | |
Adjust paths based on your theme setup. These paths work with Bones theme | |
*/ |
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 | |
set -o errexit | |
PNGS=`find . -iname "*.png"` | |
JPGS=`find . -iname "*.jpg"` | |
TMP1="_TMP1.PNG" | |
TMP2="_TMP2.PNG" | |
echo "Optimizing PNG" | |
for PNG in ${PNGS} |
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 | |
# Paste at Pastebin.com using command line (browsers are slow, right?) | |
# coder : Anil Dewani | |
# date : Novemeber 7, 2010 | |
#help function | |
howto() | |
{ | |
echo "\ | |
Pastebin.com Bash Script \ |
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
<?php | |
/** | |
* Super-simple AWS CloudFront Invalidation Script | |
* | |
* Steps: | |
* 1. Set your AWS access_key | |
* 2. Set your AWS secret_key | |
* 3. Set your CloudFront Distribution ID | |
* 4. Define the batch of paths to invalidate | |
* 5. Run it on the command-line with: php cf-invalidate.php |
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 python3 | |
# | |
# Copyright (c) 2020 Brenden Matthews <brenden@brndn.io> under the MIT license | |
# at https://opensource.org/licenses/MIT | |
# | |
# This script converts existing Route53 records into Terraform HCL. I created | |
# this for a one-off job. The script uses the AWS CLI to fetch Route53 info, | |
# and prints the corresponding TF code to stdout. | |
# | |
# Example usage: |
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 | |
print_help() { | |
echo -e "Usage:\n\n $0 [--profile PROFILE] [s3_url]\n" | |
exit 1 | |
} | |
while [[ -n $1 ]]; | |
do | |
if [[ $1 == "-p" ]] || [[ $1 == "--profile" ]]; then |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,5d,e0,37,e0,00,00,00,00 | |
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
# -*- coding: utf-8 -*- | |
# pylint: disable=consider-using-f-string,invalid-name,line-too-long,super-with-arguments | |
''' | |
Ranger color-scheme using `$LS_COLORS` / `dircolors`. | |
Originally based on: https://github.com/ranger/colorschemes/raw/a250fe866200940eb06d877a274333a2a54c34f3/ls_colors.py | |
Usage: copy this file to `~/.config/ranger/colorschemes'. The base color-scheme | |
used for non file system entries / the unfocused pane is `default`. To change it, |
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
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}' | |
#ACAD1A | |
#B0BB1E | |
#DEBB1E | |
#AB1DED | |
#ACAC1A | |
#ACCEDE | |
#AC1D1C | |
#BAB1ED | |
#BA0BAB |
OlderNewer