Skip to content

Instantly share code, notes, and snippets.

View sheabunge's full-sized avatar
😴

Shea Bunge sheabunge

😴
View GitHub Profile
@sheabunge
sheabunge / feedly.css
Created February 23, 2014 02:52
Tweaks for Feedly on smaller screens. Use with something like Stylish.
body.home {
top: 0 !important;
margin: 0 auto;
max-width: 100%;
}
#feedlyTabs {
padding-right: 55px !important;
padding-left: 10px !important;
max-width: 200px;
@sheabunge
sheabunge / dl-file.php
Last active August 29, 2015 14:07 — forked from hakre/dl-file.php
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@sheabunge
sheabunge / gist:de7e69eb6d81ad804b26
Last active August 29, 2015 14:15
Not eXactly C line following code
/******************** Line Follow ********************/
task LineFollow()
{
OnFwd(L_MOTOR, POWER);
while(true)
{
if(SENSOR_A_BLACK)
{
if(SENSOR_B_WHITE)
@sheabunge
sheabunge / helloworld.bat
Created October 1, 2012 10:09
How to print or output the text Hello World! in many different languages. Feel free to fork and contribute. http://bungeshea.com/2011/hello-world/
@echo Hello World!
@pause
@sheabunge
sheabunge / rememeber-me-checked.php
Last active October 11, 2015 05:37
Automatically checks the "Remember Me" box on the WordPress login page
<?php
/**
* Plugin Name: Remember Me Checked
* Plugin URI: http://bungeshea.com/remember-me-checked/
* Description: Automatically checks the "Remember Me" box on the WordPress login page
* Author: Shea Bunge
* Author URI: http://bungeshea.com
* Version: 1.0
*/
@sheabunge
sheabunge / sunrise.php
Created November 7, 2012 20:01 — forked from chrisguitarguy/sunrise.php
A `sunrise.php` drop in that (mostly) allows custom domains in WordPress multisite. Still needs some more work, but it gets the job done.
<?php
/**
* A sunrise.php drop in that allows you to use WordPress' built in `domain`
* and `path` settings for MultiSite blogs.
*
* Some limitations:
* - Using this with a MS install and paths (not subdomains) does some
* weird stuff when updating `siteurl` and `home` while updating domain.
* So you'll you'll have to update those separately. There are probably
* filters to fix this.
@sheabunge
sheabunge / custom-wp-email.php
Created November 23, 2012 22:50
Change how WordPress sends emails
<?php
/**
* Plugin Name: Custom WordPress Email
* Plugin URI: https://gist.github.com/4137632
* Description: Change how WordPress sends emails
* Author: Shea Bunge
* Author URI: http://bungeshea.com
* Version: 1.0
*/
@sheabunge
sheabunge / widget-shortcode.php
Created December 12, 2012 10:33
Easily insert any WordPress sidebar widget into a post or page using a shortcode. http://wp.smashingmagazine.com/2012/12/11/inserting-widgets-with-shortcodes/
<?php
/**
* Plugin Name: Widget Shortcode
* Plugin URI: http://wp.smashingmagazine.com/2012/12/11/inserting-widgets-with-shortcodes/
* Description: Easily insert any WordPress sidebar widget into a post or page using a shortcode.
* Author: Smashing Magazine
* Author URI: http://www.smashingmagazine.com
* Version: 1.0
*/
@sheabunge
sheabunge / uninstall.php
Created January 13, 2013 05:03
WordPress multisite plugin uninstall
<?php
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
exit();
if ( is_multisite() ) {
$blogs = $wpdb->get_results( "SELECT blog_id FROM $wpdb->blogs", ARRAY_A );
if ( $blogs ) {
foreach ( $blogs as $blog ) {
switch_to_blog( $blog['blog_id'] );
<?php
/**
* Change Admin URL
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.