Skip to content

Instantly share code, notes, and snippets.

View drzippie's full-sized avatar
👁️‍🗨️

Antonio Cortes (DrZippie) drzippie

👁️‍🗨️
View GitHub Profile
@drzippie
drzippie / jquery_plugin.coffee
Created December 25, 2013 10:44
Coffeescript - Create a jQuery Plugin
# Reference jQuery
$ = jQuery
# Adds plugin object to jQuery
$.fn.extend
# Change pluginName to your plugin's name.
pluginName: (options) ->
# Default settings
settings =
option1: true
@drzippie
drzippie / Settings.php
Created December 17, 2013 21:11
Settings: Key => value as Singleton
<?php
class Settings {
var $values;
final public static function getInstance() {
static $aoInstance = null;
if (is_null($aoInstance)) {
$aoInstance = new Settings();
}
return $aoInstance;
@drzippie
drzippie / functions_wordpress_jquery.coffee
Created December 17, 2013 21:08
Coffeescript for Wordpress and jQuery
jQuery(document).ready ($) ->
alert "Hello World!"
return
@drzippie
drzippie / PHP_excel_maker.php
Created December 17, 2013 21:04
Basic Excel Generator PHP
<?php
/**
* Basic Excel Generator
*
* Usage:
$data = array(
array( 'cell_1_1', 'cell_1_2'),
array( 'cell_2_1', 'cell_2_2')
);
$excel = new ExcelMaker( $data ) ;