Skip to content

Instantly share code, notes, and snippets.

View mfd's full-sized avatar

Kami mfd

  • Checkmagush
View GitHub Profile
@mfd
mfd / jquery.hoverIntent.min.js
Last active October 9, 2017 17:42
sngstats__topslots scripts
/*!
* hoverIntent v1.9.0 // 2017.09.01 // jQuery v1.7.0+
* http://briancherne.github.io/jquery-hoverIntent/
*
* You may use hoverIntent under the terms of the MIT license. Basically that
* means you are free to use hoverIntent as long as this header is left intact.
* Copyright 2007-2017 Brian Cherne
*/
!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):jQuery&&!jQuery.fn.hoverIntent&&factory(jQuery)}(function($){"use strict";var cX,cY,_cfg={interval:100,sensitivity:6,timeout:0},INSTANCE_COUNT=0,track=function(ev){cX=ev.pageX,cY=ev.pageY},compare=function(ev,$el,s,cfg){if(Math.sqrt((s.pX-cX)*(s.pX-cX)+(s.pY-cY)*(s.pY-cY))<cfg.sensitivity)return $el.off(s.event,track),delete s.timeoutId,s.isActive=!0,ev.pageX=cX,ev.pageY=cY,delete s.pX,delete s.pY,cfg.over.apply($el[0],[ev]);s.pX=cX,s.pY=cY,s.timeoutId=setTimeout(function(){compare(ev,$el,s,cfg)},cfg.interval)},delay=function(ev,$el,s,out){return delete $el.data("hoverIntent")[s.id],out.apply($el[0],[ev])};$.
@mfd
mfd / bootstrap-mq.scss
Created October 5, 2017 10:31 — forked from olegpolyakov/bootstrap-mq.scss
Bootstrap Sass Media Query Variables
//== Media queries breakpoints
// Extra small screen / phone
$screen-xs: 480px;
$screen-xs-min: $screen-xs;
// Small screen / tablet
$screen-sm: 768px;
$screen-sm-min: $screen-sm;
@mfd
mfd / fromMgn__multiline.geojson
Last active October 4, 2017 11:55
K24 animated
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mfd
mfd / _bm_strava2gpx.md
Last active March 29, 2019 06:42
strava2gpx

Strava2gpx

make bookmarklet

(function(){
  /**
   * Loader for bookmarklets.
   * 
   * @author Alexey V. Ptitsyn <a@skippy.su>
   * 
@mfd
mfd / osx-terminal-rename.sh
Created October 3, 2017 17:07
Bulk Rename in osx terminal
# General format:
brew install rename
# General format:
rename -v s/OLD/NEW/ FILENAMES
# Where:
# - OLD is a regular expression
# - NEW is the replacement pattern
# - FILENAMES is a list of files to search/replace
@mfd
mfd / pluralize.js
Last active September 23, 2017 18:37
cyrillic pluralize
var t = {
d: 6,
h: 5,
m: 23,
s: 53
}
var pluralize = function(t, e) {
var s = void 0
, n = e % 100;
@mfd
mfd / ImageMagick_snippets.md
Last active March 20, 2018 18:44
ImageMagick sprite image snippets

imagemagick sprite

convert $(ls *.png | sort -r) +append res/result-sprite-vertical.png
convert $(ls *.png) -append res/result-sprite-horizontal.png
convert *png *gif -append PNG8:res/result-sprite-horizon.png

imagemagick Montage #

montage *.png -background transparent -geometry +4+4  res/sprite.png
montage $(ls *.png -t) -mode Concatenate -tile 2x16+1+1 -border 2 res/sprite.png
@mfd
mfd / gotham.md
Last active April 5, 2024 04:17
Gotham font
https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css

<link rel="https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css">

Тестовое задание на позицию frontend-разработчика

Напишите фукцию (модуль, компонент) для показа объектов на карте по клику

Синтаксис

/**
 * @param dialogURL - имя компании
@mfd
mfd / README.md
Created June 1, 2017 07:50 — forked from lopezjurip/README.md
OSX Homebrew: docker-machine setup

Prerequisites

Make sure you have installed Homebrew and (Homebrew-Cask)[http://caskroom.io/].

# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Install Homebrew-cask
brew install caskroom/cask/brew-cask