Problem:
- The code is buggy 🐛
- The code is open for having problems after every release
- The same codebase occurs side-effects for each functionality as B2C and B4B ♻️
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 moment from 'moment' | |
class Timestamp { | |
private timestamp: string; | |
private readonly format = 'YYY-MM-DD HH:mm:ss' | |
private constructor(timestamp: string) { | |
this.timestamp = timestamp | |
} |
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 uuidv4 from 'uuid/v4'; | |
class OrderId { | |
private id: string; | |
private constructor(id: string) { | |
this.id = id; | |
} |
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
Sketch for Testing Purposes | |
First State | |
go to second step -> Second State | |
Second State | |
go to third step -> Third State | |
Third State | |
go back to second step -> Second State | |
go back to first step -> First State |
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
[ | |
{ "id": 118748738, "playTime": 12002, "auto": false }, | |
{ "id": 118805291, "playTime": 17307, "auto": false }, | |
{ "id": 118801891, "playTime": 15466, "auto": false }, | |
{ "id": 118793510, "playTime": 5971, "auto": true }, | |
{ "id": 118793313, "playTime": 5865, "auto": false }, | |
{ "id": 118793313, "playTime": 2302, "auto": false }, | |
{ "id": 118793510, "playTime": 6578, "auto": false }, | |
{ "id": 118764182, "playTime": 5726, "auto": false }, | |
{ "id": 118793510, "playTime": 6557, "auto": false }, |
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
Q: How many ways are there to make an AJAX call in Javascipt? | |
const url = 'http...' | |
const response = await fetch(url).then(response => response.toJSON()) | |
.then(response => response.data) | |
Q: How can we write a method like the following: | |
sum(2)(4) | |
// returns 6 |
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
/** | |
* Retrieves the devices matching the kind property with the inputKind argument | |
* @param {String} inputKind The type of the input like 'videoinput' | |
* @param {MediaDeviceInfo} device The device instance | |
* @return {MediaDeviceInfo} The matching media device | |
*/ | |
const getDeviceWith = ({ inputKind, device }) => { | |
return (device.kind === inputKind) && device | |
} |
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
ssh-keygen -t rsa -b 4096 -C "your_email@example.com" | |
Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter] | |
Enter passphrase (empty for no passphrase): [Type a passphrase] | |
Enter same passphrase again: [Type passphrase again] | |
pbcopy < ~/.ssh/id_rsa.pub | |
Go to the Github profile and update the RSA key there by adding a new name for it |
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 React from 'react' | |
export const Header = () => <div>This is header component</div> |
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
* sudo chown -R "$USER":admin /Library/Caches/Homebrew | |
http://stackoverflow.com/questions/8253362/etc-apt-sources-list-e212-cant-open-file-for-writing | |
* NerdTREE | |
https://github.com/vim-scripts/The-NERD-tree | |
* apt-vim | |
https://github.com/egalpin/apt-vim#install | |
* Vim color scheme |