Skip to content

Instantly share code, notes, and snippets.

#
# Start with a fresh Raspbian Jessie Lite installation from https://www.raspberrypi.org/downloads/raspbian/
#
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y install vim
sudo apt-get -y install subversion
sudo apt-get -y install git
@jdembowski
jdembowski / https-new-sites.php
Created February 6, 2016 18:49
Make new sites in a WordPress network have https URLs.
<?php
/*
Plugin Name: Make new sites in the network with https URLs
Description: Force new sites in a multisite network to use HTTPS as the scheme.
Plugin Author: Jan Dembowski
This probably should not be necessary and the scheme should be picked up
by WordPress. But I could not get my new sites to use https so here I am.
#!/bin/bash
CURRENTIP=$(dig +short tf2.dn7.me | tail -1)
OLDIP=$(</var/cache/tf2.dn7.me-ip)
if [ "$CURRENTIP" != "$OLDIP" ]
then
# Delete existing /sbin/iptables rules for port 27015
# From http://serverfault.com/questions/401416/iptables-clear-all-prerouting-rules-with-a-specific-destination-address
<?php
/*
Plugin Name: GModules Rewrite Links
Description: This will filter links in posts, pages, and comments to use "http://gmodules.com/ig/proxy?url=" instead.
Version: 1.0
*/
add_filter( 'the_content' , 'mh_gmodule' , 50 );
add_filter( 'the_content_rss' , 'mh_gmodule' , 50 );
add_filter( 'comment_text' , 'mh_gmodule' , 50 );
<?php
/*
Plugin Name: Phantom 3D
Plugin URI: http://blog.dembowski.net/2012/02/12/now-in-3d/
Description: This plugin wraps posted tagged with "Phantom 3D" in a div that applies red-blue to the text for an old fashioned 3D effect.
Author: Jan Dembowski
Version: 1.0
Author URI: http://blog.dembowski.net/
*/
<?php
/*
Plugin Name: Are You Licensed?
Description: This plugin checks your hostname to see if you are adhering to the <a href="http://wordpressfoundation.org/trademark-policy/">WordPress Foundation Trademark Policy</a>. It does <strong>not</strong> check if you are running an activated installation of WordPress. This not a Microsoft plugin.
Author: Jan Dembowski
Author URI: https://blog.dembowski.net/
Version: 0.3
*/