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
<div class="parent"> | |
<div class="child"></div> | |
</div> |
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(window, $, undefined){ | |
// name your plugin | |
var pluginName = 'enter-your-plugin-name-here'; | |
// optionally keep track of your plugin's version | |
var version = '0.0.1'; | |
// all the logic resides here | |
function pluginLogic(el, options){ |
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
/** | |
* copyright stuff should go here to | |
* | |
* @author: bogdan.gradinariu@gmail.com | |
* @pluginName: myPlugin | |
* @description: a jquery plugin that does something | |
* @usage: | |
* | |
* //initialization | |
* $('selector').myPlugin(options); |
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
<?php | |
function add_custom_taxonomies() { | |
// Add new "Preparation Time" taxonomy to out Recipes (Posts) | |
register_taxonomy('Preparation Time', 'post', array( | |
// Hierarchical taxonomy (like categories) | |
'hierarchical' => true, | |
// This array of options controls the labels displayed in the WordPress Admin UI | |
'labels' => array( | |
'name' => _x( 'Preparation Times', 'taxonomy general name' ), | |
'singular_name' => _x( 'Preparation Times', 'taxonomy singular name' ), |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
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
//https://gist.github.com/gion/6606933 | |
;(function(global, $, undefined){ | |
var stateManager = function(){ | |
this.root = null; | |
this.prefix = null; | |
this.settings = {}; | |
this.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
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! | |
Watchers fired in the last 5 iterations: [["fn: function $locationWatch() {\n var oldUrl = $browser.url();\n var currentReplace = $location.$$replace;\n\n if (!changeCounter || oldUrl != $location.absUrl()) {\n changeCounter++;\n $rootScope.$evalAsync(function() {\n if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n defaultPrevented) {\n $location.$$parse(oldUrl);\n } else {\n $browser.url($location.absUrl(), currentReplace);\n afterLocationChange(oldUrl);\n }\n });\n }\n $location.$$replace = false;\n\n return changeCounter;\n }; newVal: 20; oldVal: 19","fn: function(context) {\n try {\n for(var i = 0, ii = length, part; i<ii; i++) {\n if (typeof (part = parts[i]) == 'function') {\n part = part(context);\n if (trustedContex |
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
#!/bin/sh | |
#Inspired by http://www.snip2code.com/Snippet/15944/git-hook-for-bower-install-and-npm-insta | |
#Notice: This won't run at git fetch. since fetch doesn't merge anything | |
#Installation: | |
# copy this script with the name:`post-merge.sh` to your project root folder | |
# symlink it to the ./git/hooks/post-merge: `ln post-merge.sh .git/hooks/post-merge | |
#You should have bash (windows users, means cygwin/mingw anything that works for you | |
#Based on the instructions here: https://oknesset-devel.readthedocs.org/en/latest/workflow.html#before-coding | |
OlderNewer