Skip to content

Instantly share code, notes, and snippets.

View binarysprocket's full-sized avatar

Binary Sprocket binarysprocket

View GitHub Profile
@markjaquith
markjaquith / disable-plugins-when-doing-local-dev.php
Created June 24, 2011 10:24
Disables specified WordPress plugins when doing local development
<?php
/*
Plugin Name: Disable plugins when doing local dev
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/
@billerickson
billerickson / gist:1670316
Created January 24, 2012 14:04
Customize Roles & Capabilities
<?php
/**
* Customize Roles & Capabilities
*
* @package Dachis
* @subpackage Core Functionality
* @version 1.0
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
@billerickson
billerickson / functions.php
Created March 22, 2012 22:07
Customize Author Box
<?php
add_filter( 'genesis_author_box', 'be_author_box', 10, 6 );
/**
* Customize Author Box
* @author Bill Erickson
* @link http://www.billerickson.net/code/customize-author-box
*
* @param string $output
* @param string $context
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@jaredatch
jaredatch / gist:3604586
Last active December 9, 2015 21:44
Load custom CSS on admin login page
<?php
/**
* Customize CSS for login screen
*
* @since 1.0.0
* @author Jared Atchison
* @link http://jaredatchison.com/code/
*/
function ja_login_screen_css() {
echo '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory() . '/css/style-login.css" />' . "\n";
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@markjaquith
markjaquith / gist:4500280
Last active April 17, 2024 21:06
Bash command to fix a quirk with Sublime Text 2's "subl" command. Sometimes, when using it, under hard-to-pinpoint circumstances, it will open up Sublime Text 2 completely blank (i.e. the file you asked it to open will not be open). This snippet fixes that by essentially kicking subl under the table to wake it up and then passing on the command …
function subl() {
if [[ ! -p /dev/stdin ]]; then
command subl > /dev/null 2>&1
fi
command subl "$@"
}
<?php
/**
* This file adds a custom template to the AgentPress Child Theme.
*
* @author Brad Dalton
* @link http://wpsites.net/web-design/make-custom-page-template/
* @package Agentpress
* @subpackage Customizations
*/
@matax87
matax87 / instapapercsv_to_readinglist.py
Created May 13, 2013 14:12
Use this script to export Instapaper unread list to Safari's Reading List. Download your instapaper-export.csv from http://www.instapaper.com/u in the "Export CSV…" section on the right.
#!/usr/bin/python
import os
import csv
reader = csv.DictReader(open('./instapaper-export.csv', 'rb'), delimiter = ',', quotechar = '"')
unread = []
for row in reader:
@jaredatch
jaredatch / gist:5640639
Last active December 17, 2015 16:39
Customize the login screen text
<?php
/**
* Customize the login screen text
*
* Some sites, primarily membership sites, are setup where the usernames ARE their email address.
* This is great, but the login screen can confuse users. So help with the confusion, we remove
* all references of "Username" on the login screen and replace with "Email".
*
* @since 1.0.0
*/