Skip to content

Instantly share code, notes, and snippets.

@roybarber
roybarber / wp-local-config.php
Created January 27, 2013 16:47
Wordpress Local Settings Template
<?php
// Local server settings
// Local Database
define('DB_NAME', 'client');
define('DB_USER', 'root');
define('DB_PASSWORD', 'root');
define('DB_HOST', 'localhost');
// Overwrites the database to save keep edeting the DB
@dbushell
dbushell / gist:4247060
Created December 9, 2012 21:19
Add SVG upload support to a WordPress theme
// add to functions.php in your WordPress theme
add_filter('upload_mimes', 'my_upload_mimes');
function my_upload_mimes($mimes = array())
{
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
@jpswelch
jpswelch / change-default-wordpress-email-account.php
Created May 7, 2012 02:07
WordPress: change default email user from wordpress@ to another@ #wordpress
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from($old) {
return 'info@domain.com';
}
function new_mail_from_name($old) {
return 'Company Name';
}
@artero
artero / launch_sublime_from_terminal.markdown
Last active January 25, 2024 16:57 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation