A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);
function file_scan_directory($dir, $mask, $options = array(), $depth = 0) { | |
// Merge in defaults. | |
$options += array( | |
'nomask' => '/(\.\.?|CVS|node_modules|bower_components)$/', | |
'callback' => 0, | |
'recurse' => TRUE, | |
'key' => 'uri', | |
'min_depth' => 0, | |
); |
srctext.replace(/(START_TEXT)(.+?)(?=END_TEXT)/, "REPLACE_TEXT"); |
git log --pretty=format:"%C(magenta)%h%C(yellow)%d\\ %C(cyan)%s%Cgreen\\ [%cn]" --decorate |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " |
// Production steps of ECMA-262, Edition 5, 15.4.4.21 | |
// Reference: http://es5.github.io/#x15.4.4.21 | |
if (!Array.prototype.reduce) { | |
Array.prototype.reduce = function(callback /*, initialValue*/) { | |
'use strict'; | |
if (this == null) { | |
throw new TypeError('Array.prototype.reduce called on null or undefined'); | |
} | |
if (typeof callback !== 'function') { | |
throw new TypeError(callback + ' is not a function'); |
(function ($) { | |
var AnimatedEl = (function(){ | |
var AnimatedEl = function (o) { | |
this.el = $(o.el); | |
this.animationType = $(o.el).data('action'); | |
this.checkInterval = o.checkInterval; | |
this.timeout = null; |
in linux you fix this with the command: | |
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
var appendNoCallback = $.fn.append; | |
$.fn.append = function() { | |
var backup = appendNoCallback.apply(this, arguments); | |
if(typeof arguments[1] == "function") arguments[1](); | |
return backup; | |
}; |
function _updateQueryStringParameter(uri, key, value) { | |
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); | |
var separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
if (uri.match(re)) { | |
return uri.replace(re, '$1' + key + "=" + value + '$2'); | |
} | |
else { |