Skip to content

Instantly share code, notes, and snippets.

View GlauberF's full-sized avatar
🎯
Foco e determinação nos objetivos.

Glauber Funez GlauberF

🎯
Foco e determinação nos objetivos.
View GitHub Profile
@GlauberF
GlauberF / aggregate_mongo.js
Last active February 5, 2022 14:32
get real object in for_id_supplier
// Requires official MongoShell 3.6+
db = db.getSiblingDB("....");
db.getCollection("produtos").aggregate(
[
{
"$project" : {
"_id" : NumberInt(0),
"produtos" : "$$ROOT"
}
},
@GlauberF
GlauberF / optimize-css.gulpfile.js
Created January 26, 2022 12:39 — forked from subodhkumarWM/optimize-css.gulpfile.js
CSS optimization post Angular prod build
const gulp = require("gulp");
const filter = require("gulp-filter");
const purify = require("gulp-purify-css");
const gzip = require("gulp-gzip");
const brotli = require("gulp-brotli");
const clean = require("gulp-clean");
const { series, parallel } = require("gulp");
// #1 | Optimize CSS
/*
@GlauberF
GlauberF / ijessica
Last active January 21, 2022 19:47
ijessica
#EXTM3U
#EXT-X-SESSION-DATA:DATA-ID="com.xui.1_5_5r2"
#EXTINF:-1 tvg-logo="http://a5.vc/3pv" group-title="Canais | Globo",Globo Brasilia FHD
http://x00.so:80/Jessicadias/Hd9hF6/131151.ts
#EXTINF:-1 tvg-logo="http://a5.vc/3pv" group-title="Canais | Globo",Globo Brasilia HD
http://x00.so:80/Jessicadias/Hd9hF6/131164.ts
#EXTINF:-1 tvg-logo="http://a5.vc/3pv" group-title="Canais | Globo",Globo Brasilia SD
http://x00.so:80/Jessicadias/Hd9hF6/131116.ts
#EXTINF:-1 tvg-logo="http://a5.vc/3pv" group-title="Canais | Globo",Globo EPTV Campinas SD
http://x00.so:80/Jessicadias/Hd9hF6/131210.ts
@GlauberF
GlauberF / parseFunctionString.ts
Last active December 2, 2021 22:26
Parse a string function definition and return a function object. Does not use eval. Analisa uma definição de função em string e retorna um objeto de função. Não usa eval.
class ParseFunctionString {
/* Parse a string function definition and return a function object. Does not use eval.
* @param {string} str
* @return {function}
*
* Example:
* var f = function (x, y) { return x * y; };
* var g = parseFunction(f.toString());
* g(33, 3); //=> 99
*/
@GlauberF
GlauberF / n-grams.php
Last active July 18, 2021 21:10
- pt: Nos campos de linguística computacional e probabilidade, um n-grama é uma sequência contígua de n itens de uma determinada amostra de texto ou fala. Os itens podem ser fonemas, sílabas, letras, palavras ou pares de bases de acordo com a aplicação. Os n -gramas normalmente são coletados de um corpus de texto ou fala.[1] -en: In the fields o…
<?php
function pre_print_r($var){
echo "<pre>";
print_r($var);
echo "</pre>";
}
function Bigrams($word){
@GlauberF
GlauberF / parseFunction.js
Created May 4, 2021 17:39 — forked from lamberta/parseFunction.js
Parse a JavaScript string function definition and return a function object. Does not use eval.
/* Parse a string function definition and return a function object. Does not use eval.
* @param {string} str
* @return {function}
*
* Example:
* var f = function (x, y) { return x * y; };
* var g = parseFunction(f.toString());
* g(33, 3); //=> 99
*/
function parseFunction (str) {
@GlauberF
GlauberF / DOMinator.ts
Created March 25, 2021 19:11
Generate HTML from Typescript
// Library
// Simple transformation of Javascript to HTML.
class Dominator {
private readonly eventListeners: any[];
private readonly children: any[];
private element: any;
private id: any;
private content: any;
private properties: any;
private tag: any;
@GlauberF
GlauberF / DOMinator.js
Last active March 17, 2021 17:57
Generate HTML from Javascript
// Library
// Simple transformation of Javascript to HTML.
class Dominator {
constructor(object) {
Object.assign(this, object)
let childObjects = []
if (object.children){
for (const child of object.children) {
let childObject = new Dominator(child)
data:text/csv;base64,dWY7Y29kaWdvO2V4O3RpcG87bmFjaW9uYWxmZWRlcmFsO2ltcG9ydGFkb3NmZWRlcmFsO2VzdGFkdWFsO211bmljaXBhbDt2aWdlbmNpYWluaWNpbzt2aWdlbmNpYWZpbTt2ZXJzYW8Kc2M7MDAwMDAwMDA7OzA7Ny44NTs5Ljg1OzAuMDA7MC4wMDswMS8wMi8yMDIxOzMwLzA0LzIwMjE7MjEuMS5BCmFjOzAwMDAwMDAwOzswOzcuODU7OS44NTswLjAwOzAuMDA7MDEvMDIvMjAyMTszMC8wNC8yMDIxOzIxLjEuQQ==
@GlauberF
GlauberF / instalar_programanas_deepin.sh
Created February 16, 2021 11:44 — forked from tgmarinho/instalar_programanas_deepin.sh
Instalação de Programas no Linux Deepin
#!/bin/bash
## RECOMENDO EXECUTAR ESSE SCRIPT NA PASTA DOCUMENTOS DENTRO DO USUARIO
echo "PRECISA DE INTERNET PARA EXECUTAR ESSE SCRIPT"
echo "FAZ DOWNLOAD DE ARQUIVOS NA NET"
sudo su
apt-get update -y