Skip to content

Instantly share code, notes, and snippets.

View adampatterson's full-sized avatar
:octocat:

Adam Patterson adampatterson

:octocat:
View GitHub Profile
@adampatterson
adampatterson / package.json
Created November 21, 2013 06:09
Package file
{
"name": "project-name",
"version": "0.0.1",
"dependencies": {
"grunt-cli": "latest",
"grunt-contrib-concat": "latest",
"grunt-contrib-uglify": "latest",
"grunt-contrib-less": "latest",
"grunt-contrib-watch": "latest",
"grunt-recess": "latest",
@adampatterson
adampatterson / Gruntfile.js
Created November 21, 2013 06:08
My Grunt task
module.exports = function(grunt) {
grunt.registerTask('watch', [ 'watch' ]);
grunt.initConfig({
recess: {
options: {
compile: true,
},
  • Download
  • Install
  • Run Ghost
  • ERROR - Node was out dated.
  • Update Node
  • Run Ghost
  • ERROR - The DB didn't get created
  • Run the installer again
  • ERROR - The DB still was not created
  • Delete Ghost
$mp->identify( $info['id'] );
if ( $stats['is_install'] == 'true' )
$mp->track("Install");
else
$mp->track("Update");
$mp->track("Server Stats", array(
"is_install" => $stats['is_install'],
"prev_version" => $stats['prev_version'],
@adampatterson
adampatterson / Textmate.xml
Last active December 21, 2015 23:39
Update to tab
<?xml version="1.0" encoding="UTF-8"?>
<keymap version="1" name="TextMate" parent="Mac OS X 10.5+">
<action id="$Delete">
<keyboard-shortcut first-keystroke="DELETE" />
</action>
<action id="Back">
<keyboard-shortcut first-keystroke="meta alt LEFT" />
<mouse-shortcut keystroke="button4" />
</action>
<action id="Console.Jpa.GenerateSql" />
var surl = "http://tentaclecms.com/api/feed/json/";
$.ajax({
url: surl,
dataType: "jsonp",
jsonp : "callback",
jsonpCallback: "jsonpcallback",
success: function jsoncallback(json) {
// Load this as part of your Bootstrap mixins.less make sure to also compile the responsive.less if needed.
// Adds centered columns.
/*
<div class="row">
<div class="center6">
<div class="span3">3</div>
<div class="span3">3</div>
</div>
</div>
@adampatterson
adampatterson / next-post
Created June 13, 2013 19:57
Provides Next/Previous single custom post navigation.
<?php
/*
Plugin Name: Next Post
Plugin URI: http://adampatterson.ca
Description: Provides shortcodes and template tags for next/previous navigation in custom post types.
Version: 1
License: GPLv2
Author: Adam Patterson
Author URI: http://adampatterson.ca
*/
.container {
display: block;
width: 80%;
margin: 60px auto;
}
.clearfix {
*zoom: 1;
&:before,
&:after {
@adampatterson
adampatterson / gist:3961595
Created October 26, 2012 21:18
tentacle-appfog
<? if(!defined('DINGO')){die('External Access to File Denied');}
if ( getenv( "VCAP_SERVICES" ) ) {
$services_json = json_decode(getenv("VCAP_SERVICES"),true);
$mysql_config = $services_json["mysql-5.1"][0]["credentials"];
$username = $mysql_config["username"];
$password = $mysql_config["password"];
$hostname = $mysql_config["hostname"];
$db = $mysql_config["name"];