Skip to content

Instantly share code, notes, and snippets.

View ericoloewe's full-sized avatar

Érico De Souza Loewe ericoloewe

View GitHub Profile
@ericoloewe
ericoloewe / flat-object.js
Created August 14, 2019 18:55
transform an object to flat object with dots like { 'prop.a.b': value }
/**
* Flat an object
* @param {object} obj
* @param {string|undefined} prevProp
* @returns {object} flatted
*/
function flatObject(obj, prevProp) {
if (typeof obj !== 'object') {
throw new Error('obj must be an object')
}
{
"workbench.colorTheme": "Default Light+",
"workbench.colorCustomizations": {
"[Default Light+]": {
"gitDecoration.ignoredResourceForeground": "#666",
"sideBar.background": "#f5f5f5",
"sideBar.border": "#cccedb",
"sideBar.foreground": "#000000",
"sideBarSectionHeader.background": "#007acc",
"sideBarSectionHeader.border": "#00000000",
@ericoloewe
ericoloewe / auto-creation-decorator.ts
Created March 15, 2019 21:23
Try to create an auto creation decorator for typescript
function Service<T extends any>(module: NodeModule, clazz: T) {
module.exports[(<T>clazz).name] = new clazz()
return function (_constructor: any) { }
}
@Service<LoremService>(module, LoremService)
class LoremService {
}

Informações gerais da materia

Professor

REGINA DE OLIVEIRA HEIDRICH

@ericoloewe
ericoloewe / _inteligencia-artificial-e-computacional.md
Last active November 27, 2018 23:18
Inteligência artificial e computacional

Informações gerais da materia

Professor

RODRIGO RAFAEL VILLARREAL GOULART

@ericoloewe
ericoloewe / _topicos-avançados-em-computação-iv.md
Last active November 27, 2018 23:21
Tópicos avançados em computação IV

Informações gerais da materia

Professor

Ricardo

@ericoloewe
ericoloewe / _compiladores.md
Last active November 27, 2018 23:19
Compiladores

Informações gerais da materia

Professor

Ricardo

@ericoloewe
ericoloewe / google-spreadsheets-multiple-items-in-combo-box.js
Created April 3, 2018 12:20
Possibility to add multiple items in google spreadsheets combo-box
var SEPARATOR = "; ";
function onEdit(event) {
try {
checkMultipleComboBoxEvent(event);
} catch (ex) {
Logger.log("There are some problem to edit");
Logger.log(ex);
}
}