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);
#!/bin/sh -e | |
#git-cache-meta -- simple file meta data caching and applying. | |
#Simpler than etckeeper, metastore, setgitperms, etc. | |
#from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694 | |
#modified by n1k | |
# - save all files metadata not only from other users | |
# - save numeric uid and gid | |
# 2012-03-05 - added filetime, andris9 |
find . -name .git -printf "\n%h\n" -execdir git fetch --all -v --progress \; |
(function($){ | |
// Setup Ninja form - on Sumbit Yandex metric targeting. | |
$(document).on('nfFormSubmitResponse', function(e, r){ | |
var Target = "form-"+r.id, | |
YMVar = $(document.scripts).filter(function(){ return /w.yaCounter\d+/.test($(this).text()) }).text().replace(/^.*w.(yaCounter\d+)\s+.*$/im, "$1"); | |
if (YMVar && window[YMVar]) window[YMVar].reachGoal(Target); | |
}); | |
})(jQuery); |
@function strip-unit($num) { | |
@return $num / ($num * 0 + 1); | |
} | |
@function calcSize($size,$base:16px,$unit:1rem,$calc:true) { | |
// https://gist.github.com/MrSwed/958077f384bfeb62cc799b0946999590 | |
@if ($calc) { | |
@return calc(#{$unit} * #{strip-unit($size)} / #{strip-unit($base)}); | |
} @else { | |
@return $unit * $size / $base; |
@echo off | |
rem https://gist.github.com/MrSwed/36abd8ed745e5717e9c0d926b2270137 | |
rem 20191111_111148 11.11.2019 11:11:48.57 | |
set datestr=%date:~-4%%date:~-7,2%%date:~-10,2%_%time:~-11,2%%time:~-8,2%%time:~-5,2% | |
echo %datestr% %date% %time% |
// use in debug console browser | |
// | |
var $d=[]; | |
$(".comments__block").each(function(){ | |
var t = this, | |
dt = $(".comments__table__items__date",t).text().match(/(\d+)[-;:.,]?(\d+)[-;:.,]?(\d+) (\d+):(\d+):(\d+)?/); | |
var r = { | |
'title' : $(".comments__table__items__name",t).clone().children().remove().end().text(), | |
'tagid' :'', |
// Adaptive sprite. Scss functions | |
// https://gist.github.com/MrSwed/9b74275a7c5fa82c78619f2b7b9bd4ba | |
// based on less mixins | |
// https://gist.github.com/MrSwed/162bc57a6225ff139d5299b6fb7944b3 | |
// Defaults | |
$fzr: 16px; // html rem | |
$fz: $fzr; // body, current | |
$SpriteImgUrl: url(../images/sprite.png); |
$(function(){ | |
$.fn.extend({ | |
/* A kit of jQuery extensions for an forms manipulation via Ajax | |
* https://gist.github.com/MrSwed/2d86f2f0fd96fdc1e81aa414f0d53881 | |
*/ | |
"class": function(){ | |
/* jQuery-class-extender: Get className even is empty jQuery object https://gist.github.com/MrSwed/0a837b3acbfbf8cfb19e */ | |
return $(this).attr("class") || | |
$(this).selector.toString().replace(/^.*[\s]+([^\s])/, "$1").replace(/(^[^\.]+\.|[:][^\s]+)/, "").split(".") | |
.join(" ").trim(); |
// Adaptive sprite. Less functions | |
// https://gist.github.com/MrSwed/162bc57a6225ff139d5299b6fb7944b3 | |
@fzr: 16px; | |
@fz: @fzr; | |
// functions | |
// Convert units | |
// https://gist.github.com/MrSwed/00c35fa57dd820eab7434149b72fa695 |