Skip to content

Instantly share code, notes, and snippets.

View agjs's full-sized avatar
⌨️

Aleksandar Grbic agjs

⌨️
View GitHub Profile
@agjs
agjs / how-to-format-erb-vscode.json
Created March 26, 2021 10:53
Format .erb templates and ruby files inside VSCode
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",
}
function foo(role, level) {
console.log(`Your role is ${role} and your level is ${level}.`);
console.log(this);
}
foo();
var person = {
name: 'Julie'
};
// Fluent api
function Chai() {}
Chai.prototype.expect = function(number) {
this.number = number;
return this;
};
Chai.prototype.increment = function() {