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
| #!/bin/bash | |
| # Enable command tracing to print commands as they run | |
| set -x | |
| # Default values if not provided | |
| SERVER_URL=${1:-"https://local-cronicle.schoolcurrent.net:8443"} | |
| API_KEY=${2:-"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"} | |
| # Display which server and API key we're using |
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
| /* | |
| * Available context bindings: | |
| * COLUMNS List<DataColumn> | |
| * ROWS Iterable<DataRow> | |
| * OUT { append() } | |
| * FORMATTER { format(row, col); formatValue(Object, col); getTypeName(Object, col); isStringLiteral(Object, col); } | |
| * TRANSPOSED Boolean | |
| * plus ALL_COLUMNS, TABLE, DIALECT | |
| * | |
| * where: |
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 | |
| // Single Dimension | |
| $a = ['asdf', 'fdsa']; | |
| $b = ['ASDF', 'FDSA']; | |
| $c = ['asdf', 'fdsa']; | |
| echo '$a = $b? => ' . (($a == $b)?'true':'false'); | |
| echo PHP_EOL; | |
| echo '$a = $c? => ' . (($a == $c)?'true':'false'); |
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
| /([A-Za-z-]+):\s([^\r\n]+(?:\r?\n(?![A-Za-z-]+:\s)[^\r\n]+)*)/mx |
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
| products = { | |
| [ | |
| "id" : 1 | |
| "type" : "Internal Use" | |
| ], | |
| [ | |
| "id" : 2 | |
| "type" : "public" | |
| ] | |
| } |
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
| .filter('trust', [ | |
| '$sce', | |
| function($sce) { | |
| return function(value, type) { | |
| // Defaults to treating trusted text as `html` | |
| return $sce.trustAs(type || 'html', value); | |
| } | |
| } | |
| ]) |
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 onBreakPointChange(breakPoint){ | |
| // Put code here to run on any break point change. | |
| // Ex. large to medium and medium to large and small to medium... | |
| if (matchMedia(Foundation.media_queries['small']).matches){ | |
| // Put code here to run when page changes to small | |
| } | |
| if (matchMedia(Foundation.media_queries['medium']).matches){ | |
| // Put code here to run when page changes to medium |
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
| // For use with jQuery | |
| // Example | |
| equalize_heights('.row .box') | |
| // This will make all the .box elements the same height. | |
| function equalize_heights(elem){ | |
| // Get an array of all element heights | |
| var elementHeights = $(elem).map(function() { | |
| return $(this).height(); | |
| }).get(); |
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
| /** | |
| * | |
| * Tests if browser is mobile | |
| * | |
| * @returns {boolean} | |
| */ | |
| function isMobile() { | |
| if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { | |
| return true; |
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
| /** | |
| * | |
| * Wordpress | |
| * | |
| * Returns the url of a posts featured image by size. | |
| * | |
| * @param $post_id | |
| * @param $size thumbnail,small,medium,large,full.... | |
| * | |
| * @return mixed |