This file contains 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
RewriteEngine on | |
# If the request is not for a valid directory | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# If the request is not for a valid file | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# If the request is not for a valid link | |
RewriteCond %{REQUEST_FILENAME} !-l |
This file contains 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
jQuery(function($){ | |
function debug(str) { | |
if (settings.debug) { console.log(str); } | |
} | |
// Helper methods | |
var helper = { | |
}; |
This file contains 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 MyModule = (function($, Modernizr) { | |
// Module variables. Use for local tracking | |
var data = { | |
} | |
// Module init; This will run during onready if module is defined in the <body> data attribute | |
var init = function() { | |
_debug("main.init()"); |
This file contains 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
// Tiny selector - Callback is passed all matching elements | |
// $m(parent, tagName, [className,] callback) | |
function $m(p, tn, cn, cb) { | |
if (typeof p === "string") { var p = document.getElementById(p); } | |
var l = p.getElementsByTagName(tn); | |
for (a=0; a < l.length; a++) { | |
if (typeof cn === "function") { | |
cn(l[a]); |
This file contains 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
<? | |
echo SKU_gen('Factory Town', 13, 2).'<br>'; // zrgr-0013 | |
echo SKU_gen('Stronghold', 13, 2).'<br>'; // zrgrn-0013 | |
echo SKU_gen('Ice Palace', 14, 2).'<br>'; // glc-0014 | |
echo SKU_gen('Twin Pits', 15, 3).'<br>'; // cz-0015 | |
echo SKU_gen('Rainbow Farms', 20).'<br>'; // kz-0020 | |
echo SKU_gen('The Great Chasm', 20).'<br>'; // kz-0020 | |
echo SKU_gen('Ranch', 20).'<br>'; // kz-0020 | |
echo SKU_gen("Brad's Lighthouse", 20).'<br>'; // kz-0020 | |
echo SKU_gen("Train Station", 20).'<br>'; // kz-0020 |
This file contains 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 class="no-js" lang="en"> | |
<head> | |
<title>Off Canvas Page Slide / Fly-Out Navigation Example | Responsive Navigation</title> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
This file contains 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
/* | |
JS Standalone Module Template | |
Replace MYCLASS with your desired class name | |
Anything declared using MYCLASS will be public | |
*/ | |
(function() { | |
var self = this; | |
var MYCLASS; |
This file contains 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
// Tiny selector - Callback is passed all matching elements | |
// $m(parent, tagName, [className,] callback) | |
function $m(p, tn, cn, cb) { | |
if (typeof p === "string") { var p = document.getElementById(p); } | |
var l = p.getElementsByTagName(tn); | |
for (a=0; a < l.length; a++) { | |
if (typeof cn === "function") { | |
cn(l[a]); |
This file contains 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
function generate_image_thumbnail($source_image_path, $thumbnail_image_path, $max_width, $max_height, $quality=35) { | |
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path); | |
switch ($source_image_type) { | |
case IMAGETYPE_GIF: | |
$source_gd_image = imagecreatefromgif($source_image_path); | |
break; | |
case IMAGETYPE_JPEG: | |
$source_gd_image = imagecreatefromjpeg($source_image_path); | |
break; | |
case IMAGETYPE_PNG: |
This file contains 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
.DS_Store | |
.AppleDouble | |
.LSOverride | |
Icon | |
._* | |
.Spotlight-V100 | |
.Trashes | |
Thumbs.db | |
ehthumbs.db | |
Desktop.ini |
OlderNewer