Skip to content

Instantly share code, notes, and snippets.

View shawnrgrimes's full-sized avatar

Shawn Grimes shawnrgrimes

View GitHub Profile
body{
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
@shawnrgrimes
shawnrgrimes / Localhost Wordpress Permissions
Created September 14, 2013 14:33
Enable updating WordPress in a local environment on OS X (Updates, Themes and Plugins)
On Mac OS X (Leopard+), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.
One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.
$ cd /<wherever>/Sites/<thesite>
$ sudo chown -R _www wordpress
$ sudo chmod -R g+w wordpress
This way, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable.
@shawnrgrimes
shawnrgrimes / field_values.js
Created August 16, 2013 20:19
Form inputs that remember default values. Example: http://jsfiddle.net/shawnrgrimes/rv8xY/
// Inputs that remember value
$(':text')
.each(function (currentIndex) {
$(this).data("originalValue", this.value);
})
.focus(function () {
$(this).removeClass("unfocused");
if ($(this).val() === $(this).data("originalValue")) {
$(this).val('');
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
<title>untitled</title>
<link rel="stylesheet" href="" />
</head>
<body>
@shawnrgrimes
shawnrgrimes / ST User Settings
Last active October 10, 2015 16:18
My Sublime Text User Settings
{
"binary_file_patterns":
[
"*.psd"
],
"bold_folder_labels": true,
"close_windows_when_empty": true,
"color_scheme": "Packages/Color Scheme - User/Code School 2.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":