Skip to content

Instantly share code, notes, and snippets.

View igolopolosov's full-sized avatar
🚀
Shipping

Igor Golopolosov igolopolosov

🚀
Shipping
View GitHub Profile

Keybase proof

I hereby claim:

  • I am igolopolosov on github.
  • I am igolopolosov (https://keybase.io/igolopolosov) on keybase.
  • I have a public key ASDbjUKynWKlL3qcjY3s5qNlVwanDBd-EhgKIHm_VsSllQo

To claim this, I am signing this object:

@igolopolosov
igolopolosov / GarageBand-MIDI-percussion-key-map.markdown
Last active April 12, 2020 23:09
Map of the MIDI keys for percussion in Garage Band
MIDI  Note    Drum Sound
====  ====    ==========
36    C2      Bass Drum 1
37    C#2     Side Stick
38    D2      Acoustic Snare
39    Eb2     Hand Clap
40    E2      Electric Snare
41    F2      Low Floor Tom
42 F#2 Closed Hi Hat
@igolopolosov
igolopolosov / .bash_profile
Last active October 13, 2021 10:39
Igor's colored bash profile
# to edit your bash profile you can inspect existing one and then copy content of file while editing in vim
# cat ~/.bash_profile
# vim ~/.bash_profile
export TERM=xterm-color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
@igolopolosov
igolopolosov / read_line_of_integers.py
Last active February 23, 2019 22:25
🐍 Simple function to read line containing integer values 🐍used at https://www.hackerrank.com
def read():
return list(map(int, input().split(' ')))
@igolopolosov
igolopolosov / increment-and-decrement.js
Created August 7, 2018 13:01
Explanation of behaviour around increment and decrement
// increment
var i = 1;
console.log(i++ + ++i); // 4
var i = 1;
console.log(i++ + i++); // 3
var i = 1;
console.log(++i + i++); // 4
function b64EncodeUnicode(str) {
// first we use encodeURIComponent to get percent-encoded UTF-8,
// then we convert the percent encodings into raw bytes which
// can be fed into btoa.
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,
function toSolidBytes(match, p1) {
return String.fromCharCode('0x' + p1);
}));
}
@igolopolosov
igolopolosov / scrollable.tsx
Last active August 31, 2017 12:45
Simple way to create component with scrolling by drag.
import React from 'react';
import ReactDOM from 'react-dom';
/**
* Div with scroll by drag.
*/
export class Scrollable extends React.Component<any, any> {
SPEED = 2.5;