Skip to content

Instantly share code, notes, and snippets.

Avatar
🌟
Automating workflows.

Seth Carstens scarstens

🌟
Automating workflows.
View GitHub Profile
@scarstens
scarstens / sunrise.php
Created Aug 23, 2017
multisite-top-level-domain-config
View sunrise.php
<?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 Oct 16, 2017
control OS X microphone input volume
View osx-mic-input-control.sh
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 Jul 31, 2014
@trepmal's My Sites Search plugin for wordpress multisite menus with too many sites
View my-sites-search.php
<?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 Dec 16, 2021
Nginx Image Filter Resize Proxy Service
View image-proxy.conf
# 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.