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
[*] | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
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
// Could be any query string | |
var parameters = document.location.search; | |
var parametersObject = parameters | |
// Skip the "?" at the beginning of the string | |
.substr(1) | |
// Split into an array of individual parameters | |
.split("&") | |
// Split each parameter into an array of its key and value | |
.map(function(a){ |
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
location ~* \.(woff)$ { | |
add_header Content-Type "application/font-woff"; | |
} | |
location ~* \.(otf)$ { | |
add_header Content-Type "application/font-sfnt"; | |
} | |
location ~* \.(eot)$ { | |
add_header Content-Type "application/vnd.ms-fontobject"; | |
} | |
location ~* \.(ttf)$ { |
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
/** | |
* Simple initializer for bootstrap-daterangepicker. | |
* | |
* @copyright David Shepard 2015 (http://github.com/kynatro) | |
* | |
* Abstracts the initialization requirements for Dan Grossman's bootstrap-daterangepicker | |
* (http://www.daterangepicker.com/). This initializer needs Moment.js, jQuery, Bootstrap | |
* and the Bootstrap Date Range Picker libraries loaded to operate. | |
* | |
* To take advantage of this script, just add [data-toggle="daterangepicker"] to any element |
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
;(function($, window, undefined){ | |
// Prevent scrolling on a page | |
$(window).on('mousewheel keydown', function(event){ | |
// Un-comment to only prevent scrolling when an arbitrary global is true | |
// if(window.preventScroll) return; | |
// Only prevent default on specific key presses (pageup, pagedown, end, home, left, up, right, down) | |
if(event.type == "keydown"){ | |
if($.inArray(event.keyCode, [33, 34, 35, 36, 37, 38, 39, 40]) !== -1) event.preventDefault(); | |
} |
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
// IE version detection - 100% reliable since it depends on IE unique functionality | |
var ie = (function(){ | |
// IE <= 9 | |
var undef, | |
v = 3, | |
div = document.createElement('div'), | |
all = div.getElementsByTagName('i'); | |
while ( | |
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->', | |
all[0] |
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
function slugify(str){ | |
return str.replace(/[^\w\d\s\-]+/g, "") // Strip invalid characters | |
.replace(/_+/g, "-") // Replace _ with - | |
.replace(/^[\s|\-]+|[\s|\-]+$/, "") // Trim whitespace | |
.replace(/(\s+)/g, ",") // Replace spaces with , for spliting | |
.replace(/([A-Z]+)/g, ",$1") // Add , between capitals for splitting | |
.replace(/^,/, "") // Trim off the first comma if one was added | |
.split(",") // Split it apart | |
.join("-") // Put it together | |
.replace(/-+/g, "-") // Get rid of serial - |
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
OriginalString.replace(/(<([^>]+)>)/ig,"") |
NewerOlder