Skip to content

Instantly share code, notes, and snippets.

View MOgorodnik's full-sized avatar
🎯
Focusing

Maksim Ogorodnik MOgorodnik

🎯
Focusing
View GitHub Profile
@MOgorodnik
MOgorodnik / redux_start-principle
Created September 3, 2020 13:59
redux_start-principle
import {createStore} from 'redux';
const initState = {
car: 'Audi',
color: 'red'
}
// console.log('initState', initState)
function reducer(state = initState, action) {
[
{
"title": "<h1>London</h1>",
"descr": "<p>Capital of GrateBretan!</p>",
"image": "<img src=\"https://london.ac.uk/sites/default/files/styles/promo_mobile/public/2018-10/london-aerial-cityscape-river-thames_1.jpg?itok=ekaaHHpi\">"
},
{
"title": "<h1>Paris</h1>",
"descr": "<p>Capital of France!</p>",
"image": "<img src=\"https://london.ac.uk/sites/default/files/styles/promo_mobile/public/2018-10/london-aerial-cityscape-river-thames_1.jpg?itok=ekaaHHpi\">"
@MOgorodnik
MOgorodnik / dabblet.css
Created November 12, 2019 22:49
Fluid background, fixed content
/**
* Fluid background, fixed content
*/
header, section, footer {
padding: 1em calc(50% - 600px);
}
footer {
background: #333;
@MOgorodnik
MOgorodnik / meta-tags.md
Created February 21, 2019 14:11 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@MOgorodnik
MOgorodnik / FizzBuzz.js
Created September 6, 2018 11:26 — forked from jaysonrowe/FizzBuzz.js
FizzBuzz JavaScript solution
for (var i=1; i <= 20; i++)
{
if (i % 15 == 0)
console.log("FizzBuzz");
else if (i % 3 == 0)
console.log("Fizz");
else if (i % 5 == 0)
console.log("Buzz");
else
console.log(i);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Step#3</title>
<style id="jsbin-css">
*,*:before,*:after{
box-sizing: border-box;
}

Keybase proof

I hereby claim:

  • I am mogorodnik on github.
  • I am mogorodnik (https://keybase.io/mogorodnik) on keybase.
  • I have a public key ASBf5pry4YhgbSF6N4Gsg2Oe-yWe59WPa5TUK2sNztQWNAo

To claim this, I am signing this object:

@MOgorodnik
MOgorodnik / js-task-1.md
Created February 7, 2018 20:22 — forked from codedokode/js-task-1.md
Задания на яваскрипт (простые)
@MOgorodnik
MOgorodnik / Number input plus&minus
Created September 1, 2016 09:43
number input plus minus
// number input plus minus
// http://pcvector.net/scripts/forms/380-uvelichit-i-umenshit-znachenie-v-pole-input.html
$('.js-minus').click(function () {
var $input = $(this).parent().parent().find('input');
// var $input = $(this).parents(".number").find('input');
var count = parseInt($input.val()) - 1;
count = count < 1 ? 1 : count;
$input.val(count);
$input.change();
return false;
@MOgorodnik
MOgorodnik / GMap - scroll>click>mouseout
Last active October 12, 2016 11:05
Scroll under map, zoom after click and scroll again after mousout
google.maps.event.addListener(map, 'click', function(event){
this.setOptions({scrollwheel:true});
});
google.maps.event.addListener(map, 'mouseout', function(event){
this.setOptions({scrollwheel:false});
});
google.maps.event.addListener(map, 'click', function(event){
this.setOptions({draggable:true });
});
google.maps.event.addListener(map, 'idle', function(event){