Skip to content

Instantly share code, notes, and snippets.

View avidenov's full-sized avatar

Alexander Videnov avidenov

View GitHub Profile
@avidenov
avidenov / applcation.js
Created December 5, 2015 07:05
Dependent selection JS that works with form model binding
var $ = jQuery;
$(document).ready(function(){
listenForSpecialtySelect();
});
function listenForSpecialtySelect(){
// Set initialy on load
setSpecialtySelect();
@avidenov
avidenov / deploy.rb
Created April 24, 2016 17:39
Capistrano recipe
require 'capistrano/recipes/deploy/strategy/copy'
set :stages, %w(staging production)
set :default_stage, "staging"
# options parsing & validation
set :stage_name, (ARGV.first if ARGV.first != "deploy") || default_stage
# basic settings
set :application, "Appname"
@avidenov
avidenov / index.html
Created May 1, 2017 16:04
HTML, CSS & jQuery animated page switch
<!DOCTYPE html>
<html>
<head>
<meta charset='utf8' />
<title>Page 1</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:100, 300,400" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body>
<div class="loader visible">
/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v3.5.5 - 2016-06-16
* Desc: Include this file in any page being loaded into an iframe
* to force the iframe to resize to the content size.
* Requires: iframeResizer.min.js on host page.
* Copyright: (c) 2016 David J. Bradshaw - dave@bradshaw.net
* License: MIT
*/
!function(a,b){"use strict";function c(b,c,d){"addEventListener"in a?b.addEventListener(c,d,!1):"attachEvent"in a&&b.attachEvent("on"+c,d)}function d(b,c,d){"removeEventListener"in a?b.removeEventListener(c,d,!1):"detachEvent"in a&&b.detachEvent("on"+c,d)}function e(a){return a.charAt(0).toUpperCase()+a.slice(1)}function f(a){var b,c,d,e=null,f=0,g=function(){f=Ha(),e=null,d=a.apply(b,c),e||(b=c=null)};return function(){var h=Ha();f||(f=h);var i=ya-(h-f);return b=this,c=arguments,0>=i||i>ya?(e&&(clearTimeout(e),e=null),f=h,d=a.apply(b,c),e||(b=c=null)):e||(e=setTimeout(g,i)),d}}function g(a){return na+"["+pa+"] "+a}function h(b){ma&&"object"==typeof a.console&&console.log(g(b))