Skip to content

Instantly share code, notes, and snippets.

@umer4ik
umer4ik / eslintrc.json
Created August 10, 2022 09:09
Default configuration of eslint
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
function strip(html){
var doc = new DOMParser().parseFromString(html, 'text/html');
return doc.body.textContent || "";
}
const createHeaders = ({
json = true,
...rest
}) => {
const headers = new Headers()
if (json) {
headers.append('Content-type', 'application/json')
}
Object.keys(rest).forEach(key => {
headers.append(key, rest[key])
@umer4ik
umer4ik / git
Last active February 28, 2019 09:20
git config credential.helper store
git config --global alias.st status
# if fatal: terminal prompts disabled
export GIT_TERMINAL_PROMPT=1
@umer4ik
umer4ik / regexes.js
Created January 23, 2017 12:25
Regexes
//find all words after ~ charachter
// 'getByPath(~Assigned) + ma~Ass)' => ['Assigned', 'Ass']
'getByPath(~Assigned) + ma~Ass)'.match(/~[a-z,A-Z]{0,}/g).map(el => el.substring(1));
@umer4ik
umer4ik / adblock
Created January 23, 2017 12:19
my settings
vk.com##DIV[id="ads_left"]
music.yandex.ua##SPAN[class="no-ads link link_major "]
widgets.binotel.com$script
widget.siteheart.com$script
mc.yandex.ru/metrika/watch.js$script
www.google-analytics.com/analytics.js$script
an.yandex.ru
code.jivosite.com$script
call.chatra.io$script
push.world$script