Website: urish.org
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($) { | |
$.fn.act = function() { | |
var args = arguments; | |
return this.each(function() { | |
for (var i = args.length; i--;) { | |
$(this).on(args[i][0], args[i][1], args[i][2]); | |
} | |
}); | |
}; | |
})(jQuery); |
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
@font-face { | |
font-family: 'icomoon'; | |
src:url('../../fonts/icomoon.eot?-acamik'); | |
src:url('../../fonts/icomoon.eot?#iefix-acamik') format('embedded-opentype'), | |
url('../../fonts/icomoon.woff?-acamik') format('woff'), | |
url('../../fonts/icomoon.ttf?-acamik') format('truetype'), | |
url('../../fonts/icomoon.svg?-acamik#icomoon') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
/* | |
* source: http://nicolasgallagher.com/micro-clearfix-hack/ | |
*/ | |
.clearfix:before, .clearfix:after { content: " "; display: table; } | |
.clearfix:after { clear: both; } | |
.clearfix { *zoom: 1; } |
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
/** | |
* Bind generator with context preserved. | |
* @param {Generator} fn The generator | |
* @return {Generator} Generator with arguments bind. | |
*/ | |
var _bind = function (fn) { | |
var args = [].slice.call(arguments, 1); | |
return function * () { | |
var ir = fn.apply (this, args.concat.apply(args, arguments)); | |
var n; |
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://eslint.org/docs/user-guide/configuring | |
module.exports = { | |
root: true, | |
parser: 'babel-eslint', | |
parserOptions: { | |
sourceType: 'module' | |
}, | |
env: { | |
browser: true, |
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
// Current Persons Data Structure in Client | |
const clientData = [{ | |
id: 1, | |
employed: true | |
}, | |
{ | |
id: 2, | |
employed: false | |
}, |
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 findEvenIndex(arr) | |
{ | |
var left = 0, right = arr.reduce(function(pv, cv) { return pv + cv; }, 0); | |
for(var i = 0; i < arr.length; i++) { | |
if(i > 0) left += arr[i-1]; | |
right -= arr[i]; | |
if(left == right) return i; | |
} | |
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
/** | |
* Annoying.js - How to be an asshole to your users | |
* | |
* DO NOT EVER, EVER USE THIS. | |
* | |
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com) | |
* Visit https://gist.github.com/767982 for more information and changelogs. | |
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog | |
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors | |
* |
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
export default function(WrappedComponent) { | |
const mixinProps = (WrappedComponent.mixins || []) | |
.filter((mixin) => mixin.props) | |
.map((mixin) => mixin.props); | |
const allProps = mixinProps.concat(WrappedComponent.props); | |
const mergedProps = allProps.reduce((merged, props) => Object.assign(merged, props), {}); | |
return { | |
props: mergedProps, | |
render(createElement) { |
OlderNewer