Skip to content

Instantly share code, notes, and snippets.

View adampatterson's full-sized avatar
:octocat:

Adam Patterson adampatterson

:octocat:
View GitHub Profile
var surl = "http://tentaclecms.com/api/feed/json/";
$.ajax({
url: surl,
dataType: "jsonp",
jsonp : "callback",
jsonpCallback: "jsonpcallback",
success: function jsoncallback(json) {
@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" />
$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'],
  • 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
@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,
},
@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",
-- Create syntax for TABLE 'extension'
CREATE TABLE `extension` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`extension_name` text NOT NULL,
`extension_slug` varchar(200) NOT NULL,
`extension_type` text NOT NULL,
`repo_name` varchar(200) DEFAULT NULL,
`revision` int(11) DEFAULT '0',
`count` int(11) DEFAULT NULL,
`description` longtext,

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

<?
if ( have_posts() ):
echo '<!-- '.$post->post_name.'-->';
if ( is_front_page() ):
get_template_part('templates/content', 'home');
else:
if ( file_exists(get_template_directory().'/templates/content-'.$post->post_name.'.php'))
get_template_part('templates/content', $post->post_name);
else
get_template_part('templates/content', 'page');
(function($) {
var o = $( {} );
$.each({
trigger: 'publish',
on: 'subscribe',
off: 'unsubscribe'
}, function( key, val ) {
jQuery[val] = function() {
o[key].apply( o, arguments );