Skip to content

Instantly share code, notes, and snippets.

View jacksonfdam's full-sized avatar
💻
Coding...

Jackson F. de A. Mafra jacksonfdam

💻
Coding...
View GitHub Profile
<?php namespace content;
/**
* See blog post for details: http://www.suburban-glory.com/blog?page=174
*
* Content_Type
*
* @package class for creating dynamic Wordpress metaboxes
* @author Andy Walpole
* @copyright AWalpole
* @version 2013
<?php namespace content;
/**
* Category_Add_Field
*
* redirect() method is called in the header.php file
* if the user specifies an external URL in the category field
*
* @package class for creating dynamic Wordpress metaboxes
* @author Andy Walpole
* @copyright A Walpole
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="yes" name="apple-mobile-web-app-capable">
<title></title>
<!-- iPhone -->
<link href="http://taylor.fausak.me/static/images/apple-touch-icon-57x57.png"
/**
* This gist demonstrates how to properly load jQuery within the context of WordPress-targeted JavaScript so that you don't
* have to worry about using things such as `noConflict` or creating your own reference to the jQuery function.
*
* @version 1.0
*/
(function( $ ) {
"use strict";
$(function() {
@jacksonfdam
jacksonfdam / gist:4119235
Created November 20, 2012 16:57 — forked from akagomez/gist:1025933
Install Git, Node, NPM, Nginx, PHP (Fast CGI), CouchDB, and MySQL on Ubuntu 10.04 LTS
# This should be run on a new Linode Ubuntu 32-bit 10.04 image as root to prepare it for Nginx, PHP, MySQL, Node, CouchDB environment
# To start, something like this works:
# scp prepare_server.sh root@123.456.789.10:/root
# First, install basic linux utilities (compilers, git, libssl)
cd /root
mkdir /src
cd src
@jacksonfdam
jacksonfdam / mongoose debug
Created August 16, 2012 00:13 — forked from aheckmann/mongoose debug
using visionmedia/debug with mongoose
var mongoose = require('mongoose')
, debug = require('debug')('mongoose')
mongoose.set('debug', function (name, method) {
switch (method) {
case 'find':
case 'findOne':
case 'insert':
case 'update':
case 'remove':
@jacksonfdam
jacksonfdam / app.js
Created August 14, 2012 03:44 — forked from pixelhandler/app.js
Develop a RESTful API Using Node.js With Express and Mongoose - See: http://pixelhandler.com/blog/2012/02/09/develop-a-restful-api-using-node-js-with-express-and-mongoose/
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
<snippet>
<content><![CDATA[public function get${1/(.*)/\u$1/}()
{
return \$this->${1:$SELECTION};
}
public function set${1/(.*)/\u$1/}(\$$1)
{
return \$this->$1 = \$$1;
}
@jacksonfdam
jacksonfdam / gist:3099676
Created July 12, 2012 17:58
Sublime Text2 - PHP Getter and Setter Snippet
<snippet>
<content><![CDATA[public function get${1/(.*)/\u$1/}()
{
return \$this->${1:$SELECTION};
}
public function set${1/(.*)/\u$1/}(\$$1)
{
\$this->$1 = \$$1;
return \$this;
@jacksonfdam
jacksonfdam / SwipeView.h
Created July 2, 2012 05:21 — forked from siannopollo/SwipeView.h
A UIVIew class to detect swipes, and forward the message on to a delegate which can react to the swipe
#import <UIKit/UIKit.h>
@protocol SwipeViewDelegate;
@interface SwipeView : UIView {
id <SwipeViewDelegate> swipeDelegate;
int touchBeganX, touchBeganY;
int touchMovedX, touchMovedY;
}