Skip to content

Instantly share code, notes, and snippets.

View danyliak's full-sized avatar

Nazarii Danyliak danyliak

View GitHub Profile
@danyliak
danyliak / git.migrate
Created May 22, 2018 16:04 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
<div class="asset-table">
<div class="title-row asset-row clearfix">
<div class="asset-number"></div>
<div class="asset-img"></div>
<div class="asset-name">Name</div>
<div class="work-orders clearfix">
<div class="wo-title">Work order</div>
<div class="wo-cat">Category</div>
<div class="wo-fr">Frequency</div>
JS:
$(".accordeon dd").hide().prev().click(function() {
$(this).parents(".accordeon").find("dd").not(this).slideUp().prev().removeClass("active");
$(this).next().not(":visible").slideDown().prev().addClass("active");
});
CSS:
.accordeon .active { color: red }
HTML:
@danyliak
danyliak / common.js
Created July 20, 2015 20:24
Аякс отправка форм
//Аякс отправка форм
//Документация: http://api.jquery.com/jquery.ajax/
$("#main_form").submit(function() {
$.ajax({
type: "POST",
url: "mail.php",
data: $(this).serialize()
}).done(function() {
alert("Спасибо за заявку!");
setTimeout(function() {
//Animate CSS + WayPoints javaScript Plugin
//Example: $(".element").animated("zoomInUp", "zoomOutDown");
//Author URL: http://webdesign-master.ru
(function($) {
$.fn.animated = function(inEffect, outEffect) {
$(this).css("opacity", "0").addClass("animated").waypoint(function(dir) {
if (dir === "down") {
$(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1");
} else {
$(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1");
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
@danyliak
danyliak / Resize header
Last active August 29, 2015 14:25
Resize header on full height
function bgHeader(){
$('.main_head').css('height', $(window).height());
}
bgHeader();
$(window).resize(function(){
bgHeader();
})