Skip to content

Instantly share code, notes, and snippets.

View jamesmrobinson's full-sized avatar

James Robinson jamesmrobinson

View GitHub Profile
@jamesmrobinson
jamesmrobinson / wp-config.php
Created May 20, 2023 01:45 — forked from franz-josef-kaiser/wp-config.php
My default wp-config.php file for the nightly.dev stack. Not beautiful, but it got everything.
<?php
# SHORTS
# DIRECTORY SEPARATOR
define( 'DS', DIRECTORY_SEPARATOR );
# PATH SEPARATOR
define( 'PS', PATH_SEPARATOR );
# Absolute path to the WordPress directory.
! defined( 'ABSPATH' )
AND define( 'ABSPATH', dirname( __FILE__ ).DS );

Keybase proof

I hereby claim:

  • I am jamesmrobinson on github.
  • I am jmrcodes (https://keybase.io/jmrcodes) on keybase.
  • I have a public key ASBpFnZfL1SqTUzJ1Xa33T_q2UVc2kX116DnxmOGnPfUhgo

To claim this, I am signing this object:

@jamesmrobinson
jamesmrobinson / wp-config-local.php
Last active January 25, 2017 04:52
A more useful wp-config file
<?php
// ** MySQL settings
define('DB_NAME', 'database_name_here');
define('DB_USER', 'username_here');
define('DB_PASSWORD', 'password_here');
define('DB_HOST', 'localhost');
// ** DEV DEBUG settings
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
@jamesmrobinson
jamesmrobinson / strip-query-strings.js
Created May 4, 2016 05:29
Strips GET query strings from a URL without reload by using history.pushState
var stripUrlStrings = function(){
if (window.location && window.location.href && window.history && history.pushState) {
var url = window.location.href;
url = url.split('?')[0];
history.pushState(null, null, url);
}
};
@jamesmrobinson
jamesmrobinson / meta-tags.md
Last active March 31, 2016 22:48 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website’s subject'>
<meta name='copyright' content='company name'>
<!-- Facebook -->
<a href="http://www.facebook.com/sharer.php?u=https://simplesharebuttons.com">Facebook</a>
<!-- Twitter -->
<a href="https://twitter.com/share?url=https://simplesharebuttons.com&amp;text=Simple%20Share%20Buttons&amp;hashtags=simplesharebuttons">Twitter</a>
<!-- Google+ -->
<a href="https://plus.google.com/share?url=https://simplesharebuttons.com">Google</a>
<!-- LinkedIn -->
<?php
/**
* Plugin Name: WP Disqus Embed
* Plugin URI: https://imaginarymedia.com.au/2015/02/11/wordpress-plugin-to-embed-disqus/
* Description: A plugin to add Disqus embedding support via shortcode
* Version: 0.1
* Author: Imaginary Media
* Author URI: https://imaginarymedia.com.au/
* License: GPL2
*/
@jamesmrobinson
jamesmrobinson / _social-media-colours.scss
Last active August 29, 2015 14:13
Hex colours for different social media brands
// Social Media Colours
$twitter: #55acee;
$facebook: #385185;
$googleplus: #dd4b39;
$pinterest: #be2026;
$wordpress: #21759b;
$github: #151013;
$myspace: #040707;
$linkedin: #0077b5;
@jamesmrobinson
jamesmrobinson / custom-posts.php
Last active March 16, 2017 10:09
A custom post type plugin for WordPress. The plugin will add the custom post type Projects and these posts will also feature a metabox that allows you to toggle whether the post is featured.
<?php
/**
* Plugin Name: Custom Post Types
* Plugin URI: https://gist.github.com/nosquirrelbones/316a29936e5e7d709665
* Description: A simple plugin (template) to register custom post types
* Version: 1.1
* Author: James Robinson
* Author URI: http://jmr.codes/
* License: GPL2
*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
only screen and (-o-min-device-pixel-ratio: 13/10),
only screen and (min-resolution: 120dpi),
only screen and (min-resolution: 1.3dppx) {
}