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
uglify: { | |
production: { | |
options: { | |
report: 'min' | |
}, | |
files: [{ | |
expand: true, | |
cwd: '<%= dir.tempJS %>/', | |
src: '*.js', | |
dest: '<%= dir.publicJS %>', |
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
$._data( $('div').get(0) , 'events'); // get events list |
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
curl -L http://npmjs.org/install.sh | sudo sh |
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
var a = 10; | |
function testFn() { | |
alert( a ); | |
alert( b ); | |
} | |
(function (funArg) { | |
var a = 20; | |
var b = 30; | |
funArg(); // что тут будет и почему? |
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
var data = new anychart.data.set([ | |
{x: 'Department Stores', value: 637166, marker: {enabled: true, type: 'star5', fill: 'gold'}}, | |
{x: 'Discount Stores', value: 721630}, | |
['Men\'s / Women\'s Specialty Stores', 148662], | |
['Juvenile Specialty Stores', 78662], | |
['All other outlets', 90000] | |
]); | |
var data2 = new anychart.data.set([ | |
{x: 'Department Stores', value: 657166, marker: {enabled: true, type: 'star5', fill: 'gold'}}, | |
{x: 'Discount Stores', value: 51630}, |
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
// Just for information of this snippet. | |
var ASCopyVersion = '1.1.0'; | |
// TESTED ON BROWSERS: | |
// * Chrome 56.0.2924.87 | |
// * Firefox 52.0 - Use Scratchpad in devtools. | |
// Copying from scratchpad doesn't work, use generated button after versions table. | |
// * Safari 10.0.3 - Just run snippet from console. |
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
javascript:(function(){'use strict';var ASCopyVersion='1.1.0',logs=document.querySelectorAll('._clipboard_log_');logs.forEach(function(a){a.parentNode.removeChild(a)});var copyButtonId='_mycustom-clipboard-button-id_',isButtonExist=document.getElementById(copyButtonId);isButtonExist&&document.getElementById(copyButtonId).remove();var versionsTable=document.querySelector('.Version_table'),md='',headSeparator='||',bodySeparator='|';function isTableHead(a){return 0==a}function add(a){md+=a}function addSeparator(a){isTableHead(a)?add(headSeparator):add(bodySeparator)}for(var tr,i=0;i<versionsTable.childNodes.length;i++)tr=versionsTable.childNodes[i].childNodes[0],addSeparator(i),tr.childNodes.forEach(function(a){add(a.innerText),addSeparator(i)}),md+='\n';if(''!=md){var button=document.createElement('button');button.id=copyButtonId,button.innerText='Click me to copy versions',button.style='\n margin: 20px 0px;\n height: 60px;\n width: 540px;\n font-size: 20pt;\n ',versionsTable.pare |
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
// ES6 9.2.3.2 Function.prototype.bind(thisArg , ...args) | |
function FunctionBind(this_arg) { // Length is 1. | |
if (!IS_CALLABLE(this)) throw MakeTypeError(kFunctionBind); | |
var boundFunction = function () { | |
// Poison .arguments and .caller, but is otherwise not detectable. | |
"use strict"; | |
// This function must not use any object literals (Object, Array, RegExp), | |
// since the literals-array is being used to store the bound data. | |
if (!IS_UNDEFINED(new.target)) { | |
return %NewObjectFromBound(boundFunction); |
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
// UserAgent list | |
// http://www.useragentstring.com/pages/useragentstring.php?name=Internet+Explorer | |
// User-agent string changes (Microsoft) | |
// https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 | |
// Understanding user-agent strings | |
// https://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx | |
// Google closure implementation |
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
import hoistStatics from 'hoist-non-react-statics'; | |
import React from 'react'; | |
/** | |
* Allows two animation frames to complete to allow other components to update | |
* and re-render before mounting and rendering an expensive `WrappedComponent`. | |
*/ | |
export default function deferComponentRender(WrappedComponent) { | |
class DeferredRenderWrapper extends React.Component { | |
constructor(props, context) { |
OlderNewer