Skip to content

Instantly share code, notes, and snippets.

View scarstens's full-sized avatar
🌟
Automating workflows.

Seth Carstens scarstens

🌟
Automating workflows.
View GitHub Profile
@scarstens
scarstens / sunrise.php
Created August 23, 2017 03:13
multisite-top-level-domain-config
<?php
if (!empty($_SERVER['HTTP_HOST']))
{
$site = get_site_by_path(strtolower($_SERVER['HTTP_HOST']), '/');
define('COOKIE_DOMAIN', '.'.$site->domain);
}
@paincompiler
paincompiler / osx-mic-input-control.sh
Last active October 16, 2017 16:33
control OS X microphone input volume
osascript -e "set volume input volume 100"
# Check every minute for mic input < 100%; if it is, dial it up elegantly
* * * * * while (( `osascript -e "input volume of (get volume settings)"` < 100 )); do osascript -e "set volume input volume (input volume of (get volume settings) + 3)"; sleep 0.1; done;
@TheLastCicada
TheLastCicada / my-sites-search.php
Created July 31, 2014 02:31
@trepmal's My Sites Search plugin for wordpress multisite menus with too many sites
<?php
/*
* Plugin Name: My Sites Search
* Plugin URI: trepmal.com
* Description: https://twitter.com/trepmal/status/443189183478132736
* Version:
* Author: Kailey Lampert
* Author URI: kaileylampert.com
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@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.