Skip to content

Instantly share code, notes, and snippets.

@tmaiaroto
tmaiaroto / image-proxy.conf
Last active December 16, 2021 03:23
Nginx Image Filter Resize Proxy Service
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below).
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G;
# Gzip was on in another conf file of mine...You may need to uncomment the next line.
#gzip on;
gzip_disable msie6;
gzip_static on;
gzip_comp_level 4;
gzip_proxied any;
# Again, be careful that you aren't overwriting some other setting from another config's http {} section.
@uglyrobot
uglyrobot / package-plugin
Last active September 14, 2017 07:28
A shell script for easy tagging and clean zip packaging of a WordPress Plugin/Theme in git.
#!/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!"
@ianmjones
ianmjones / build-as3cf-aws3.sh
Last active March 26, 2024 08:34
A script for downloading the AWS PHP SDK v3, stripping down to S3 functionality and then applying a custom namespace.
#!/usr/bin/env bash
set -e
if [ ! -d src/amazon-s3-and-cloudfront ]; then
echo 'This script must be run from the repository root.'
exit 1
fi
for PROG in composer find sed unzip
@TimTinkers
TimTinkers / Fee1155NFTLockable.sol
Created February 13, 2021 03:02
A gas-efficient mintable, lockable NFT creation contract for OpenSea listing.
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./FeeOwner.sol";