Skip to content

Instantly share code, notes, and snippets.

@motrdevua
motrdevua / countdown.js
Created March 27, 2019 10:07
countdown timer
const second = 1000;
const minute = second * 60;
const hour = minute * 60;
const day = hour * 24;
const countDown = new Date("May 20, 2020 00:00:00").getTime();
const x = setInterval(() => {
const now = new Date().getTime();
const distance = countDown - now;
@motrdevua
motrdevua / Statisic counter.js
Last active June 20, 2019 08:36
Statistic counter
// Statistics counter
$(window).on('scroll', function() {
let a = 0;
const parentOffset =
$('.stats__counters').offset().top - window.innerHeight + 100;
if (a === 0 && $(window).scrollTop() > parentOffset) {
$('.stats__count').each(function() {
const $this = $(this);
@motrdevua
motrdevua / map.js
Last active June 20, 2019 12:48
google maps
// Google map
function initMap() {
var element = document.getElementById("map");
var options = {
center: {
lat: 47.871537,
lng: 35.053622
},
@motrdevua
motrdevua / Filter jQuery.js
Last active June 26, 2019 09:21
Simple Filter
// Filter
const filterButton = $('.filter__button');
filterButton.on('click', function() {
const $this = $(this);
const filterValue = $this.attr('data-filter');
$this
.addClass('filter__button--active')
@motrdevua
motrdevua / burger
Created June 27, 2019 06:03
animated burger
// HTML
<div class="burger">
<span class="burger__line"></span>
<span class="burger__line"></span>
<span class="burger__line"></span>
</div>
//SCSS
.burger {
@motrdevua
motrdevua / fullpage settings.js
Last active June 27, 2019 19:48
settings for fullpage.js
let slideIndex = 1;
let sliding = false;
$('#fullpage').fullpage({
menu: '#menu',
anchors: [
'about',
'services',
'portfolio',
'team',
@motrdevua
motrdevua / _reset.scss
Last active March 4, 2020 20:30
reset scss file
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
vertical-align: baseline;
font: inherit;
font-size: 100%;
}
/* HTML5 display-role reset for older browsers */
@motrdevua
motrdevua / milkyway.terminal
Last active October 20, 2019 17:40
milkyway theme for mac os terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPEB4w
LjE1Mjk0MTE3NjUgMC4xNjQ3MDU4ODI0IDAuMgAQAYAC0hAREhNaJGNsYXNzbmFtZVgk
Y2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RcYVHJv
@motrdevua
motrdevua / milkyway.itermcolors
Last active March 3, 2022 15:14
milkyway theme for iTerm2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.26274511218070984</real>
@motrdevua
motrdevua / .zshrc
Last active March 12, 2022 21:55
.oh-my-zsh settings
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/motr/.oh-my-zsh"
export TERM="xterm-256color"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME