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
// allow $view_name in views | |
View::composer('*', function ($view) { | |
View::share('view_name', $view->getName()); | |
}); |
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
.blur { | |
-webkit-filter: blur(4px); | |
filter: url('data:image/svg+xmlutf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur stdDeviation="4" /></filter></svg>#filter'); | |
filter: blur(4px); | |
} |
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
html, body | |
height: 100% | |
#outer-wrap, #inner-wrap | |
position: relative | |
width: 100% | |
min-height: 100% | |
#outer-wrap | |
overflow: hidden |
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 flippy($speed: 0.5s, $perspective: 500, $bgcolor: #fff) | |
position: relative | |
@include perspective($perspective) | |
.front, .back | |
background-color: $bgcolor | |
@include transition(all $speed ease-in-out) | |
@include backface-visibility(hidden) | |
@include transform-style(preserve-3d) | |
height: 100% | |
width: 100% |
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 parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
import WatheverDirective from './wathever.directive'; | |
import WatheverController from './wathever.controller'; | |
import WatheverService from './wathever.service'; | |
export default angular.module('wathever', []) | |
.directive('wathever', WatheverDirective) | |
.controller('WatheverController', WatheverController.factory) | |
.service('WatheverService', WatheverService.factory); | |
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 Trait1 = { | |
method1() {} | |
}; | |
var Trait2 = { | |
method2() {} | |
}; | |
var Trait3 = mixin({ |
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
import $ from 'jquery'; | |
import plugin from './plugin'; | |
class ScrollToTop { | |
constructor(element, options) { | |
const $element = $(element); | |
$(window).scroll(function () { | |
if ($(this).scrollTop() > options.offset) { | |
$element.fadeIn(); |
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 | |
/** | |
* Helpers to work with Wordpress transient API | |
* | |
* @example | |
* $foo = Cache::get('foo', function () { | |
* // query DB or other complicated stuff... | |
* return $results; | |
* }, 24 * 60 * 60); |
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 | |
/** | |
* Extended Walker class for use with the | |
* Twitter Bootstrap toolkit Dropdown menus in Wordpress. | |
* Edited to support n-levels submenu. | |
* @author johnmegahan https://gist.github.com/1597994, Emanuele 'Tex' Tessore https://gist.github.com/3765640 | |
* @license CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
class BootstrapNavMenuWalker extends Walker_Nav_Menu { |