Skip to content

Instantly share code, notes, and snippets.

View marcjenkins's full-sized avatar

Marc Jenkins marcjenkins

View GitHub Profile
@marcjenkins
marcjenkins / tags.css
Last active August 8, 2023 14:27
Add tags.css to vault/.obsidian/snippets/ and then activate in Obsidian > Settings > Appearance
.cm-tag-new,
.cm-tag-added,
.cm-tag-changed,
.cm-tag-deprecated,
.cm-tag-removed,
.cm-tag-fixed,
.cm-tag-security,
.cm-tag-meeting,
.cm-tag-support {
position: relative;
@marcjenkins
marcjenkins / post-types.php
Created July 12, 2017 08:31
Create a post type in WP
<?php
/**
* Custom Post Types
* Icon reference: https://developer.wordpress.org/resource/dashicons/#editor-textcolor
* Uncomment add_action to enable
*/
// add_action('init', 'origin_cpts');
<?php
/**
* Shortcode for getting ACF option field
* Usage:
* [options field="tel"]
*/
function origin_sc_acf_option_field( $atts ) {
extract( shortcode_atts( array(
@marcjenkins
marcjenkins / CSScomb.sublime-settings
Created December 12, 2014 17:18
CSS Comb settings file for Sublime Text
{
"config": {
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": "\t",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"leading-zero": true,
@marcjenkins
marcjenkins / PM - Contract.md
Last active August 29, 2015 14:04
Project management - Contract Snippet

Project Management

If you do not have a preferred project management tool, we will provide you with a login for ours where you will be able to see the status of the project down to the specific task, so you will always be kept up to date. We’ll be relying on you to participate by answering our questions, stating your approval, requesting changes, and verifying completeness through the tool as well. We ask for a one business day turnaround time on responses so we can keep things moving along at a pace that will allow us to hit the milestones we decided on together. To keep the project organised and the management of it easier, we prefer not to communicate any of the information stated above over ordinary email.

@marcjenkins
marcjenkins / .gitignore
Last active February 18, 2020 16:57
.gitignore for WordPress projects
# Thanks to: https://gist.github.com/jdbartlett/444295
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories.
wp-content/*
!wp-content/plugins/
@marcjenkins
marcjenkins / .gitignore
Created April 17, 2014 17:36
.gitignore for MODX projects
# ignore everything in this directory
/*
# but not these
!.gitignore
!assets/
!core/
!_SASS/
!_JS/
<div class="grid container">
<div class="unit half">.unit.half</div>
<div class="unit half">.unit.half</div>
<div class="unit one-third">.unit.one-third</div>
<div class="unit one-third">.unit.one-third</div>
<div class="unit one-third">.unit.one-third</div>
<div class="unit one-quarter">.unit.one-quarter</div>
<div class="unit one-quarter">.unit.one-quarter</div>
<div class="unit one-quarter">.unit.one-quarter</div>
<div class="unit one-quarter">.unit.one-quarter</div>
<?php
function shortcodeButton( $atts, $content = null ) {
extract( shortcode_atts( array(
'link' => 'contact/',
'colour' => 'green'
), $atts ) );
return '<a href="' . "{$link}" . '" class="btn btn-' . "{$colour}" . '">' . $content . ' </a>';
}
<?php
function shortcodeButton( $atts, $content = null ) {
return '<a href="' . get_bloginfo('url') . '/contact/" class="btn">' . $content .' </a>';
}
add_shortcode('button', 'shortcodeButton');