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 requirejs = require('requirejs'); | |
// Build config file. See example in https://github.com/jrburke/r.js/blob/master/build/example.build.js | |
var jsBuildFile = '../../static/js/app/build.js' | |
try { | |
var buildConfig = eval( | |
String(fs.readFileSync(jsBuildFile)) | |
) | |
} |
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
/* jQuery throttle https://github.com/cowboy/jquery-throttle-debounce */ | |
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); | |
; | |
(function ($) { | |
var $window | |
$(function () { | |
$window = window.$window || $(window) | |
}) |
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 scrollBarWidth | |
window.getScrollBarWidth = function getScrollBarWidth() { | |
if (scrollBarWidth !== undefined) { | |
return scrollBarWidth | |
} | |
var scrollDetector = document.createElement('div') | |
scrollDetector.style.width = '50px' |
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 transformStylePropertyName | |
window.getTransformStyleProperty = function getTransformStyleProperty() { | |
if (transformStylePropertyName !== undefined) { | |
return transformStylePropertyName | |
} | |
var detectedTransform, | |
el = document.createElement('transformdetector'), | |
transforms = [ |
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
Backbone.Model.prototype.set = function(key, val, options) { | |
var attr, attrs, unset, changes, silent, changing, prev, current; | |
if (key == null) return this; | |
// Handle both `"key", value` and `{key: value}` -style arguments. | |
if (typeof key === 'object') { | |
attrs = key; | |
options = val; | |
} else { | |
(attrs = {})[key] = val; |
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 (C) 2007 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
#!/usr/bin/php | |
<? | |
// Rename this file to ffmpeg (without extention) | |
$dir = __DIR__; | |
$ffmpeg_bin = 'ffmpeg-bin'; | |
setlocale(LC_CTYPE, 'ru_RU.UTF-8'); | |
/* | |
Array | |
( |
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 | |
/** | |
* Create ACF options page under custom post type menu | |
* | |
* @since 1.0.0 | |
*/ | |
if ( function_exists( 'acf_add_options_sub_page' ) ){ | |
acf_add_options_sub_page(array( | |
'title' => 'Event Settings', | |
'parent' => 'edit.php?post_type=events', |
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
if (!Function.prototype.bind) { | |
Function.prototype.bind = function () { | |
return _.bind.apply(_, [this].concat(_.toArray(arguments))) | |
} | |
} |
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
/** | |
* BetterAfterlag 1.0.0 — Plugin for tracking page load lags. | |
* Author: Alex Batalov | |
* Based on Afterlag Plugin (https://github.com/iserdmi/afterlag-js) of Sergey Dmitriev (serdmi.com). Licensed MIT. | |
**/ | |
;(function (root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define([], function () { | |
return (root.Afterlag = factory()); | |
}); |