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 / gist:a91a29a7644503c69d19
Created December 1, 2015 09:21
JavaScript Strings: Uppercase, Lowercase and Capitalization
// uppercase
var sourceText = "To see a World in a Grain of Sand";
console.log(sourceText.toUpperCase());
> TO SEE A WORLD IN A GRAIN OF SAND
// lowercase
var sourceText = "And a Heaven in a Wild Flower";
sourceText = sourceText.toLowerCase();
console.log(sourceText);
> and a heaven in a wild flower
@MOgorodnik
MOgorodnik / 0_reuse_code.js
Created December 1, 2015 10:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@MOgorodnik
MOgorodnik / bash_meteor
Last active October 18, 2024 20:01
bash: meteor: command not found
From >>https://forums.meteor.com/t/how-to-config-meteor-command-in-git-bash-on-window-7/9703
Q: I can't use meteor command in git bash on window 7
A: $ meteor --version
bash: meteor: command not found
I try to add environment path ->;C:\Users\Rabbit\AppData\Local\.meteor.
But still don't work.
Go to this directory - C:\Users[your username]\AppData\Local\.meteor
@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){
@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 / js-task-1.md
Created February 7, 2018 20:22 — forked from codedokode/js-task-1.md
Задания на яваскрипт (простые)

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:

<!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;
}
@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);
@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">