Skip to content

Instantly share code, notes, and snippets.

View diablero13's full-sized avatar
👁️
IO let's go

Anton Boyko diablero13

👁️
IO let's go
View GitHub Profile
@diablero13
diablero13 / mac-setup-redis.md
Created June 16, 2021 18:21 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({
@diablero13
diablero13 / es6_fun.js
Created January 10, 2019 03:13
Dangerous - ES6! What's "console.log" gonna log?
'Dangerous - ES6!';
`What's "console.log" gonna log?`;
let misteries = new Array(
(number) => number,
(number) => (number),
(number) => {number},
(number) => ({number}),
(number) => {(number)}
);
/**
*
* Oiginal reporitory: https://github.com/bevacqua/assignment
*
* Assign property objects onto other objects, recursively
*
* example: assignment(a, b, c, ...)
*
* Assigns every property of b onto a. If the an object already exists on a that has one of b's properties, then assignment(a.prop, b.prop) will assign all child properties of b.prop onto a.prop. This happens recursively.
* Returns a.
@diablero13
diablero13 / README.md
Last active January 19, 2018 02:57
Utility function for traversing properties on objects and arrays.

idx

original repository

idx is a utility function for traversing properties on objects and arrays.

If an intermediate property is either null or undefined, it is instead returned. The purpose of this function is to simplify extracting properties from a chain of maybe-typed properties.

@diablero13
diablero13 / compose.js
Last active January 19, 2018 04:06
JavaScript Compose Function
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)))
// Usage : compose functions right to left
// compose(minus8, add10, multiply10)(4) === 42
//
// The resulting function can accept as many arguments as the first function does
// compose(add2, multiply)(4, 10) === 42
// Alternative version
@diablero13
diablero13 / apply_call_bind.js
Created October 22, 2015 08:41
Bind, Call и Apply в JavaScript
// Создадим простой объект, чтобы использовать его в качестве контекста
var context = { foo: "bar" };
// Функция, которая возвращает свойство «foo» контекста «this»
function returnFoo () {
return this.foo;
}
// Свойства не существует в текущей области видимости, поэтому undefined
returnFoo(); // => undefined