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 extend($object1, $object2) { | |
| return (object)array_merge((array)$object1, (array)$object2); | |
| } |
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 first($arr) { | |
| $first = array_slice($arr, 0, 1); | |
| return $first[0]; | |
| } |
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 getMediaInfo($mediaUrl) { | |
| $mediaUrl = trim($mediaUrl); | |
| // Check for YouTube | |
| $matchFound = preg_match('|^\s*https?://www.youtube.com/watch\?v=([a-zA-Z0-9\.-]+)(#.*)?\s*$|', $mediaUrl, $matches); | |
| if ($matchFound) { | |
| return (object)array( | |
| 'mediaUrl' => $mediaUrl, | |
| 'mediaSource' => 'youtube', | |
| 'mediaID' => $matches[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
| (function ($) { | |
| $.fn.partition = function(options) { | |
| options = $.extend({ | |
| count: false, | |
| wrapper : '<div>' | |
| }, options || {}); | |
| var elems = $(this), | |
| len = pos = 0; | |
| for (var i = 0; i < options.count; i++) { | |
| var sel = elems.filter(":nth-child(" + (options.count - i) + "n)"); |
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 get_video_embed_url($url) { | |
| // Check for YouTube | |
| $matchFound = preg_match('/^(https?:\/\/(www\.)?youtube\.com\/watch\?(t=(.+)&)?v=|https?:\/\/youtu\.be\/)([^?]+)(\?(t=(.+))?.*)?$/', $url, $matches); | |
| if ($matchFound) { | |
| // Video is a Youtube video | |
| $url = '//www.youtube.com/embed/' . $matches[5]; | |
| if ($matches[4]) { | |
| $url = $url . '?start=' . $matches[4]; | |
| } else if ($matches[8]) { | |
| $url = $url . '?start=' . $matches[8]; |
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
| @mixin custom-bullet($bulletText: ">", $indentWidth: 20px) { | |
| padding-left: $indentWidth; | |
| position: relative; | |
| &:before { | |
| content: $bulletText; | |
| position: absolute; | |
| margin-left: -$indentWidth; | |
| } | |
| } |
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
| jQuery.expr[':'].Contains = function(a,i,m) { | |
| return (a.textContent || a.innerText || "").toUpperCase().indexOf(m[3].toUpperCase()) >= 0; | |
| }; |
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
| #nav { | |
| text-align: justify; | |
| min-width: 500px; | |
| } | |
| #nav:after { | |
| content: ''; | |
| display: inline-block; | |
| width: 100%; | |
| } | |
| #nav li { |
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($) { | |
| var timer; | |
| $(window).bind("scroll", function (e) { | |
| clearTimeout(timer); | |
| timer = setTimeout(function () { | |
| $(window).trigger("scrollstop"); | |
| }, 150); | |
| }); | |
| })(jQuery); |