Skip to content

Instantly share code, notes, and snippets.

@johnstonian
johnstonian / css-section-title.sublime-snippet
Created September 16, 2014 15:11
CSS Title snippet for Documentation. tab trigger is "csstitle" Using Harry Robert's Method: http://cssguidelin.es/#titling
<snippet>
<content><![CDATA[
/*------------------------------------*\
#${1:section-title}
\*------------------------------------*/
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>csstitle</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
@johnstonian
johnstonian / gist:4204947
Created December 4, 2012 15:06
PHP Readmill oAuth Methods
<?php
function get_access_token($authCode) {
$url = "https://readmill.com/oauth/token.json";
$clientId = "YOUR CLIENT ID";
$clientSecret = "YOUR CLIENT SECRET";
$redirectURI = "YOUR REDIRECT URI";
// setup variables to post
@johnstonian
johnstonian / media-query.sublime-snippet
Last active December 21, 2015 14:59
Media query snippet for Sublime Text 2. Quickly inserts a media query rule by typing 'mq' into the editor.
<snippet>
<content><![CDATA[
@media only screen and (${1: max or min}-width: ${2: enter value here}) {
${3:}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>mq</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@johnstonian
johnstonian / html5-document.sublime-snippet
Last active December 28, 2015 01:29
HTML5 document snippet for Sublime Text 2. Creates a barebones html5 document when typing 'html5' and then hitting Tab.
<snippet>
<content><![CDATA[
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>${1: enter title}</title>
@johnstonian
johnstonian / facebook meta tags
Created May 27, 2014 21:24
Facebook Open Graph Meta Tags
<meta property="og:title" content=""/>
<meta property="og:image" content="fullURLHere"/>
<meta property="og:site_name" content=""/>
<meta property="og:description" content=""/>