Based on Github Doc, and clarified the confusing parts
- Open Terminal
- Checking for existing SSH keys
$ ls -al ~/.ssh # Lists the files in your .shh directory, if they exist
| Class Store { | |
| #state: { count: 0 }; | |
| constractor(initialState) { | |
| if (initialState) this.#state = initialState | |
| } | |
| get state() { | |
| return this.#state | |
| } |
| const downloadFile = (data: string, name: string) => { | |
| const blob = new Blob([data], { type: 'octet-stream' }); | |
| const href = URL.createObjectURL(blob); | |
| const a = Object.assign(document.createElement("a"); { href, download: name, style: "display: none"}) | |
| a.click(); | |
| URL.revokeObjectURL(href); | |
| } |
| const variants = { | |
| exp1: "base", | |
| exp2: "variant2", | |
| exp3: "variant3", | |
| }; | |
| const experimentSettings = { | |
| activate(exp_name, unique_identifier) { | |
| // Api call to the server | |
| return variants[exp_name] || 'base'; |
| /** | |
| * A errorHandler function | |
| * Handle Axios request error | |
| * Handle Javascript Error instance | |
| * Handle Javascript TypeError | |
| * Handle Any error and return default error message | |
| * @param {Object || Any} error | |
| * @returns {String} | |
| */ | |
| export const errorHandler = ( |
| var link = 'http://www.google.com/uploads/art/art_max_156575641388.0.png' | |
| var parsingUrl = link.match(/\.([^.]*?)(?=\?|#|$)/) | |
| /* [ '.png', 'png', index: 56, input: 'http://www.google.com/uploads/art/art_max_156575641388.0.png', groups: undefined ] */ | |
| var isPath = (/\.(jpg|jpeg|png)$/i).test(link) | |
| /* true */ | |
| trimmedArtist = artist |
| { | |
| "[javascript]": { | |
| "editor.formatOnSave": true | |
| }, | |
| "[json]": { | |
| "editor.formatOnSave": true | |
| }, | |
| "[css]": { | |
| "editor.formatOnSave": true | |
| }, |
| // https://github.com/jdesboeufs/connect-mongo#readme | |
| // https://docs.mongodb.com/manual/tutorial/expire-data/ | |
| /* A session cookie is just a normal cookie without an expiration date. | |
| Those are handled by the browser to be valid until the window is closed or program is quit. | |
| But if the cookie is a httpOnly cookie (a cookie with the httpOnly parameter set), | |
| you cannot read, change or delete it from outside of HTTP (meaning it must be changed on the server). */ | |
| cookie: { originalMaxAge: null, expires: null, httpOnly: true, path: '/' } |
| // Barchart | |
| // approach 1 - full feature integration | |
| // D3 handles props and state, | |
| // React handles rednering logic | |
| class Barchart extends Component { | |
| xScale = d3.scaleBand().paddingInner(0.1) | |
| yScale = d3.scaleLinear() |
| const log = console.log | |
| // https://www.youtube.com/watch?v=_5X2aB_mNp4 | |
| const Undefined = new Proxy(function() {}, { | |
| // if call Undefined as function, you will get Undefined | |
| get(target, key, receiver) { | |
| return Undefined; | |
| }, | |
| apply() { | |
| return Undefined; |