Skip to content

Instantly share code, notes, and snippets.

View indeedably's full-sized avatar

{ in·deed·a·bly } indeedably

View GitHub Profile
@indeedably
indeedably / wordpress_author_comment_highlight.css
Last active August 19, 2018 17:08
How to highlight author comments in Wordpress
/*
Styling the bypostauthor CSS class allows author comments to stand out.
Apply the style via the Wordpress theme customiser:
1. Open your site's Wordpress Dashboard
2. Select the Appearance / Customise menu item
3. On the Customise screen select the Additional CSS menu item
4. Paste the code snippet below, and modify to blend with your theme.
*/
@indeedably
indeedably / wordpress_disable_self_pings.php
Last active September 5, 2018 19:51
How disable Wordpress self pings.
/*
By default Wordpress will ping itself with each internal link.
This is annoying and a tad inefficient. To disable:
1. Open your Wordpress theme's functions.php file located in /wp-content/themes/[YOUR THEME]/
2. Paste the code snippet below into your functions.php
3. Save to have the changes take effect.
*/
function disable_self_pings( &$links ) {
@indeedably
indeedably / wordpress_thumbnails_in_rss_feed.php
Last active September 5, 2018 19:51
How to include thumbnail images in Wordpress RSS feeds
/*
By default Wordpress does not include post thumbnails in RSS feeds.
To enable:
1. Open your Wordpress theme's functions.php file located in /wp-content/themes/[YOUR THEME]/
2. Paste the code snippet below into your functions.php
3. Save to have the changes take effect.
*/
@indeedably
indeedably / wordpress_addtoany_rss_feed.php
Last active September 5, 2018 19:52
How to add RSS feed to Wordpress AddToAny plugin
/*
The AddToAny plugin is a great (and inobtrusive) way to add social sharing buttons to Wordpress posts.
It does not natively include RSS feed support however. To rectify that:
1. Open your Wordpress theme's functions.php file located in /wp-content/themes/[YOUR THEME]/
2. Paste the code snippet below into your functions.php
3. Save to have the changes take effect.
*/
@indeedably
indeedably / wordpress_add_widget_area_to_footer.php
Last active September 5, 2018 19:52
How to add a widget area to a Wordpress theme
@indeedably
indeedably / build_a_mac.sh
Created January 4, 2020 18:59
Build a mac
/*
Setting up a new Mac
*/
#!/bin/bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cask
brew install ffmpeg
brew install git
@indeedably
indeedably / convert_aac_file_to_mp3.sh
Last active January 4, 2020 19:01
How convert aac format files to itunes compatible mp3 format
/*
iTunes likes mp3 format music. This script converts any *.aac format files to *.mp3 format, then shifts the processed files into the appropriate old and new folders.
*/
#!/bin/bash
cd ~/Downloads/
mkdir new_music
mkdir old_music
for f in *.aac; do ffmpeg -i "$f" -codec:v copy -codec:a libmp3lame -q:a 2 new_music/"${f%.aac}.mp3"; mv "$f" old_music; done
@indeedably
indeedably / .bash_profile
Created January 5, 2020 19:21
Set up terminal colour settings
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=GxFxBxDxCxegedabagacad
alias ls='ls -GFh'
@indeedably
indeedably / wordpress_jetpack_subscription_shortcodes.php
Created September 5, 2018 20:07
How to add Wordpress Jetpack subscription form using shortcodes.
/*
The Wordpress Jetpack plugin offers a subscription widget that can be added via shortcodes.
To enable:
1. Open the Wordpress template file (e.g. footer.php) containing the desired location of the widget.
These are located in /wp-content/themes/[YOUR THEME]/
2. Paste the code snippet below into your template file in the required location.
3. Replace the [PARAMETER n] values with your desired values.
4. Save to have the changes take effect.