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
// Fluent api | |
function Chai() {} | |
Chai.prototype.expect = function(number) { | |
this.number = number; | |
return this; | |
}; | |
Chai.prototype.increment = function() { |
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 foo(role, level) { | |
console.log(`Your role is ${role} and your level is ${level}.`); | |
console.log(this); | |
} | |
foo(); | |
var person = { | |
name: 'Julie' | |
}; |
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
Details at: https://aleksandar.xyz/blog/formatting-ruby-and-erb-in-vscode/ | |
"files.associations": { | |
"*.erb": "erb" | |
}, | |
"[erb]": { | |
"editor.formatOnSave": true, | |
"editor.defaultFormatter": "aliariff.vscode-erb-beautify", | |
} |
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 { EventEmitter } from "events"; | |
class NotificationSystem extends EventEmitter { | |
constructor() { | |
this.#init() | |
} | |
#init() { | |
this.on("follow", async (targetId, metadata) => { | |
const notification = await Models.notification.create({ |
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
{ | |
"editor.minimap.enabled": false, | |
"editor.wordWrap": "on", | |
"editor.fontSize": 14, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'zero', 'onum'", | |
"editor.renderWhitespace": "none", | |
"editor.bracketPairColorization.enabled": true, | |
"editor.guides.bracketPairs": true, | |
"workbench.sideBar.location": "right", |
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
// @ts-nocheck | |
import Axios from "axios"; | |
import { setupCache } from "axios-cache-interceptor"; | |
import { CUSTOM_ERRORS_ENUM } from "@Utils/constants"; | |
import { BASE_API_URL } from "@Services/constants"; | |
const axios = setupCache(Axios); |
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
{ | |
"workbench.sideBar.location": "right", | |
"editor.fontFamily": "JetBrains Mono", | |
"editor.fontLigatures": true, | |
"background.backgroundOpacity": [ | |
0.85, | |
0.9, | |
0.9, | |
0.5 | |
], |
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
{ | |
"workbench.sideBar.location": "right", | |
"editor.fontFamily": "JetBrains Mono", | |
"editor.fontSize": 12, | |
"editor.fontLigatures": "'ss02' on, 'ss04' on, 'ss07' on, 'ss08' on, 'ss10' on, 'ss12' on", | |
"editor.lineHeight": 18, | |
"editor.fontVariations": true, | |
"background.backgroundOpacity": [0.95, 0.9, 0.9, 0.5], | |
"background.backgroundAlignment": [ | |
"Center Center", |
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
export const tiptapToHtml = ({ string, idToLabel, enableSuggestions, controls }) => { | |
try { | |
if (!string) { | |
return ""; | |
} | |
const htmlContent = sanitize( | |
generateHTML(JSON.parse(string), editorConfig({ controls, suggestionItems: () => [], idToLabel, enableSuggestions }).extensions), | |
{ | |
allowedTags: ["p", "span", "a", "iframe", "img", ...getControls(controls)], |
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
{ | |
"workbench.sideBar.location": "right", | |
"editor.fontFamily": "JetBrains Mono", | |
"editor.fontSize": 12, | |
"editor.fontLigatures": "'ss02' on, 'ss04' on, 'ss07' on, 'ss08' on, 'ss10' on, 'ss12' on", | |
"editor.lineHeight": 18, | |
"editor.fontVariations": true, | |
"background.backgroundOpacity": [0.85, 0.9, 0.9, 0.5], | |
"background.backgroundAlignment": [ | |
"Center Center", |
OlderNewer