A Pen by Melvin Davis on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@charset "UTF-8";.bootstrap-switch .bootstrap-switch-container:focus,.bootstrap-switch:focus,.compose-container .ta-text.ta-editor div:focus{outline:0}.lists-widget ol.blur,.lists-widget ol.blur ol{counter-reset:section}.alert{color:#fff;font-size:13px;font-weight:300}.alert .alert-link,.alert strong,.chartist h5{font-weight:400}.alert .close{margin-top:-3px}.alert .control-alert{padding-top:10px}.alert .control-alert button{margin-right:10px}.closeable button{color:#cbcbcb}.bg-success{background-color:rgba(144,185,0,.85);color:#fff}.bg-success a{color:#c54949}.bg-success a:hover{color:#e85656}.bg-info{background-color:rgba(45,172,209,.85);color:#fff}.bg-info a{color:#e9cd60}.bg-info a:hover{color:#dfb81c}.bg-warning{background-color:rgba(223,184,28,.85);color:#fff}.bg-warning a{color:#c54949}.bg-warning a:hover{color:#e85656}.bg-danger{background-color:rgba(232,86,86,.85);color:#fff}.bg-danger a{color:#e9cd60}.bg-danger a:hover{color:#dfb81c}.basic-btns{padding-top:8px;margin-bottom:-8px}.basic-btns h5{line- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
/** | |
* ConfigService has the configuration utilities required for the application | |
*/ | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class ConfigService { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Undefined = new Proxy(function() {}, { | |
get(target, key, receiver) { | |
if (key === 'name') { | |
return 'Undefined'; | |
} | |
return Undefined; | |
}, | |
apply() { | |
return Undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var handler = { | |
get: function(obj, prop) { | |
return prop in obj ? | |
obj[prop] : | |
37; | |
} | |
}; | |
var p = new Proxy({}, handler); | |
p.a = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function insurance(obj) { | |
return new Proxy(obj, { | |
get(target, key) { | |
const accessedProperty = Reflect.get(target, key); | |
if (typeof accessedProperty === 'object') { | |
return insurance(accessedProperty); | |
} else { | |
return accessedProperty == undefined ? | |
Undefined: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const iNeverFail = insurance({ | |
foo: 'bar', | |
baz: { | |
qux: 10, | |
name: 'yoyo' | |
}, | |
}); | |
iNeverFail.asd //ƒ anonymous() | |
iNeverFail.asd.name // "Undefined" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"strings" | |
) | |
func main() { |
- Spend some time learning Redis
- Create a small set of applications to discover different use case of Redis.
- A dummy application to mock data for e-commerce platform. Through this application, we can feed in data. Call it a data publisher. It will push platform metrics data into Redis cache. Then will pass the message through Redis about the data changes
- Another application that uses Redis cache to store and keeps a real-time track of the platform metrics(call it data subscriber). This web application will retrieve the platform metrics information on-demand from Redis cache. It will use web sockets for active connection with its client. It subscribes to the data changes published by the data publisher. If data change, ti will push the new metric information to the client.
- Redis Overview
- Redis key-value cache store
- Master/slave replication in Redis