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
| function guid() { | |
| function s4() { | |
| return Math.floor((1 + Math.random()) * 0x10000) | |
| .toString(16) | |
| .substring(1); | |
| } | |
| return s4() + s4() + '-' + s4() + '-' + s4() + '-' + | |
| s4() + '-' + s4() + s4() + s4(); | |
| } |
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 calculateGst = function(price, taxRate) { | |
| return (price * (taxRate * 100) / 100).toFixed(2); | |
| }; | |
| var addGst = function(price, taxRate) { | |
| return (price * 1 + ( price * (taxRate * 100) / 100 )).toFixed(2); | |
| }; |
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 fileName = function(filePath) { | |
| var filename = filePath.split("/"); | |
| return filename[filename.length - 1].replace(/\.[^/.]+$/, ""); | |
| }; | |
| var filePath = "/downloads/tm/logos/IMG_30012014_185815.png"; | |
| console.log( fileName(filePath) ); |
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 filenameFull = "tm_icons.png"; | |
| //Regex to remove | |
| var filenameText = filenameFull.replace(/\.[^/.]+$/, ""); |
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
| /** | |
| * | |
| * Name v0.0.1 | |
| * Description, by Chris Ferdinandi. | |
| * http://gomakethings.com | |
| * | |
| * Free to use under the MIT License. | |
| * http://gomakethings.com/mit/ | |
| * | |
| */ |
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
| # Terminal Cheat Sheet | |
| pwd # print working directory | |
| ls # list files in directory | |
| cd # change directory | |
| ~ # home directory | |
| .. # up one directory | |
| - # previous working directory | |
| help # get help | |
| -h # get help |
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
| function throttle( fn, time ) { | |
| var t = 0; | |
| return function() { | |
| var args = arguments, ctx = this; | |
| clearTimeout(t); | |
| t = setTimeout( function() { | |
| fn.apply( ctx, args ); | |
| }, time ); | |
| }; |
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 | |
| $data = array( | |
| "Performance Coaching", | |
| "Principal Responsibilities of Leadership", | |
| "Strategic Performance Template", | |
| "Team Performance Compact", | |
| "Team Performance One", | |
| "Management Performance Compact", | |
| "Management Performance One", | |
| "Leadership Performance Compact", |
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_value upload_max_filesize 64M | |
| php_value post_max_size 64M | |
| php_value max_execution_time 300 | |
| php_value max_input_time 300 |
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 | |
| /* | |
| Template Name: Month Page Template | |
| */ | |
| ?> | |
| <?php | |
| $found_month = false; | |
| global $pods; | |
| $month_slug = pods_url_variable(-1); |