Skip to content

Instantly share code, notes, and snippets.

View sarahmonster's full-sized avatar
🏚️
House falling down, brb

sarah ✈ semark sarahmonster

🏚️
House falling down, brb
View GitHub Profile
@sarahmonster
sarahmonster / .gitignore
Last active November 8, 2016 17:25
Gulp setup for WordPress themes
*.map
node_modules/*
@sarahmonster
sarahmonster / feed.php
Created September 29, 2016 08:34
This allows for breaking of post content in feeds at the more tag, rather than relying on the excerpt.
<?php
/**
* Customise feed output.
*
* @package Themename
*/
/*
* Break feed content at the <!--more--> tag.
* "For each article in a feed, show" should be set to "full text" for this to work properly.
@sarahmonster
sarahmonster / display-sharing-links.php
Created August 25, 2016 22:42
Remove (and optionally re-add) sharing links on WordPress.com
@sarahmonster
sarahmonster / typekit.php
Created August 22, 2016 13:25
Enqueue Typekit fonts for better local development.
/**
* Enqueue Typekit fonts for local development.
*
* @action wp_head
* @return string
*/
function themeslug_local_fonts() {
if ( 'http://themeslug.dev' === site_url() ):
$kit = '#######';
?>
@sarahmonster
sarahmonster / 0_reuse_code.js
Created May 26, 2016 01:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sarahmonster
sarahmonster / gist:7309014
Created November 4, 2013 20:50
Get rid of Jetpack's evil inline subscribe form CSS
$('#subscribe-field').removeAttr("style");
@sarahmonster
sarahmonster / gist:7148595
Created October 25, 2013 02:27
Hide WordPress admin bar
/* hide admin bar! */
add_filter('show_admin_bar', '__return_false');
@sarahmonster
sarahmonster / db_local.sql
Last active December 19, 2015 03:19
A series of files to include in your git directory in order to automate WordpPress database syncs.
USE DBNAME_LOCAL;
UPDATE wp_EXT_options SET option_value="http://LOCALURL:8888" WHERE option_name="siteurl";
UPDATE wp_EXT_options SET option_value="http://LOCALURL:8888" WHERE option_name="home";
@sarahmonster
sarahmonster / trac-styles.css
Created July 22, 2015 17:26
Theme trac styles
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("wpcom-themes.trac.automattic.com") {
a,
a:link,
a:visited {
color: #549dc2;
}
h3 a em,
@sarahmonster
sarahmonster / automated-backup.sh
Last active August 29, 2015 14:04
Create WordPress backup file, save to Dropbox, then pull to development copy and replace values as required.
#!/bin/sh
export DATE=`date "+%Y-%m-%d"`
export DB_HOST=localhost
export DB_NAME=
export DB_USER=
export PASSWORD=
export DROPBOX_UPLOADER=.Dropbox-Uploader/dropbox_uploader.sh
export SCRIPTS_DIR=''
# Make sure we're in the scripts dir