type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
// keeping the same pattern | |
export default await new Promise(async $export => { | |
// export the module | |
$export({my: 'module'}); | |
}); | |
// dropping the Promise all together | |
export default await (async () => { | |
// await async dependencies | |
// export the module |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var domStyle = document.createElement("style"); | |
domStyle.append( | |
'* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\ | |
* * { background-color: rgba(0,255,0,.2) !important; }\ | |
* * * { background-color: rgba(0,0,255,.2) !important; }\ | |
* * * * { background-color: rgba(255,0,255,.2) !important; }\ | |
* * * * * { background-color: rgba(0,255,255,.2) !important; }\ |
// inherit-compose.js | |
// Inheritance vs Composition | |
//INHERITANCE | |
// Character > Human > Sam | |
// Character > Robot > x73 | |
// Character > Cyborg > Dolph | |
const Character = { | |
talk: function(...msg){ |
/** | |
* Creating objects with Classes | |
* Versus objects with prototypes | |
* Since JavaScript is not a Class-based language | |
* what is happening behind the class syntax? | |
*/ | |
let PersonC = class { | |
constructor(nm, id) { | |
this.name = nm; |
##what are generators##
yield
a value, the function pauses until .next(modifiedYieldValue)
is calledvar myGen = function*() {
var one = yield 1;
var two = yield 2;
var three = yield 3;
console.log(one, two, three);
// Colors reference | |
// You can use the following as so: | |
// console.log(colorCode, data); | |
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`); | |
// | |
// ... and so on. | |
export const reset = "\x1b[0m" | |
export const bright = "\x1b[1m" | |
export const dim = "\x1b[2m" |
Copyright the authors of Honcho and/or Ben Lopatin | |
Licensed for reuse, modification, and distribution under the terms of the MIT license |