Skip to content

Instantly share code, notes, and snippets.

View ilyaashapatov's full-sized avatar
🏠
Working from Sber

Ilya Ashapatov ilyaashapatov

🏠
Working from Sber
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8' />
<link rel='stylesheet' href='style.css' />
</head>
<body>
<form id="myform">
<input type="text" name="login" id="login" />
@ilyaashapatov
ilyaashapatov / fancybox_yandex-maps.html
Created April 11, 2014 12:02
fancybox & yandex maps
<script type="text/javascript" src="http://yandex.st/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="http://fancyapps.com/fancybox/source/jquery.fancybox.js"></script>
<script type="text/javascript" src="http://fancyapps.com/fancybox/source/jquery.fancybox.js"></script>
<script type="text/javascript" src="http://api-maps.yandex.ru/2.0/?load=package.full&lang=ru-RU"></script>
<link type='text/css' href='http://fancyapps.com/fancybox/source/jquery.fancybox.css' rel='stylesheet'>
// created element
<div id="map_popup" style="width:100%; height: 100%; display: none;"></div>
function scrollTo(Y, duration, easingFunction, callback) {
var start = Date.now(),
elem = document.documentElement.scrollTop?document.documentElement:document.body,
from = elem.scrollTop;
if(from === Y) {
callback();
return; /* Prevent scrolling to the Y point if already there */
}
@ilyaashapatov
ilyaashapatov / Preferences.sublime-settings
Last active November 17, 2018 07:17
my sub settings
{
"auto_complete_selector": "source, text",
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"detect_slow_plugins": false,
"drag_text": true,
"draw_white_space": "all",
"font_face": "Monaco",
"font_size": 12.0,
"hayaku_CSS_prefixes_disable": true,
@ilyaashapatov
ilyaashapatov / slick.styl
Last active July 6, 2016 08:16
slick slider, stylus
$slick-font-path ?= "../fonts/"
$slick-font-family ?= "slick"
$slick-loader-path ?= "../images/"
$slick-arrow-color ?= white
$slick-dot-color ?= black
$slick-dot-color-active ?= $slick-dot-color
$slick-prev-character ?= '\2190'
$slick-next-character ?= '\2192'
$slick-dot-character ?= '\2022'
$slick-dot-size ?= 6px
alias g='git'
alias gst='git status'
alias gc='git commit -a -m'
alias gco='git checkout'
alias gcm='git checkout master'
alias gb='git branch'
alias glg='git log --stat --max-count=5'
alias ga='git add .'
alias gsh='git stash'
@ilyaashapatov
ilyaashapatov / gallery.bxslider.html
Created April 22, 2016 14:09 — forked from craigmdennis/gallery.bxslider.html
A BX Slider configuration that uses 2 separate sliders. One for the gallery and one for the thumbs.
function xhr($url, $type, $data) {
var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
@ilyaashapatov
ilyaashapatov / cropped.js
Last active September 13, 2017 12:02
Elements crop
$(function () {
var container = $('.js-users-crop');
if (container.length === 0) return;
var config = {
rowsCrop: (!container.attr('data-row')) ? 2 : +container.attr('data-row'), // Получаем сколько хотим видеть рядов или 2
widthChildren: container.children().outerWidth(true),
heightChildren: container.children().outerHeight(true),
openText: 'Показать всех',