This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <snippet> | |
| <content><![CDATA[public function get${1/(.*)/\u$1/}() | |
| { | |
| return \$this->${1:$SELECTION}; | |
| } | |
| public function set${1/(.*)/\u$1/}(\$$1) | |
| { | |
| return \$this->$1 = \$$1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var application_root = __dirname, | |
| express = require("express"), | |
| path = require("path"), | |
| mongoose = require('mongoose'); | |
| var app = express.createServer(); | |
| // database | |
| mongoose.connect('mongodb://localhost/ecomm_database'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WEB_WORKER = window.WEB_WORKER || {}; | |
| WEB_WORKER = (function($, window) { | |
| var _private = { | |
| worker: null, | |
| file: null, | |
| web_worker: function() { | |
| return !!window.Worker; | |
| }, | |
| set_url: function(args) { |