Skip to content

Instantly share code, notes, and snippets.

View lucassanttoss's full-sized avatar
🚀

Lucas Santos lucassanttoss

🚀
View GitHub Profile
.star-cb-group {
font-size: 0;
unicode-bidi: bidi-override;
direction: rtl;
}
.star-cb-group * {
font-size: 1rem;
}
@lucassanttoss
lucassanttoss / group-objects-by-property.md
Created October 28, 2019 13:01 — forked from JamieMason/group-objects-by-property.md
Group Array of JavaScript Objects by Key or Property Value

Group Array of JavaScript Objects by Key or Property Value

Implementation

const groupBy = key => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = obj[key];
    objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
    return objectsByKeyValue;
var value = 3.368986445;
var precRange = 5;
var around = ( 1 + "".padStart(precRange, '0')) * 1;
valueAround = Math.round(value * around) / around;
console.log(valueAround);
{
"workbench.colorTheme": "Sublime Material Theme - Dark",
"workbench.iconTheme": "material-icon-theme",
"files.autoSave": "afterDelay",
"sync.gist": "391cc4654dad6810a2e8f6a9680263c4",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnPaste": false,
@lucassanttoss
lucassanttoss / gulpfile.js
Created August 30, 2019 12:25 — forked from LoyEgor/gulpfile.js
best image compression settings (gulp-imagemin)
// install
// npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f
// node node_modules/jpegtran-bin/lib/install.js
// node node_modules/gifsicle/lib/install.js
// node node_modules/zopflipng-bin/lib/install.js
// node node_modules/mozjpeg/lib/install.js
// node node_modules/giflossy/lib/install.js
// node node_modules/pngquant-bin/lib/install.js
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@lucassanttoss
lucassanttoss / _arquivos_certificacao.markdown
Created February 10, 2018 02:53 — forked from andreregino/_arquivos_certificacao.markdown
Documentos usados na preparação para a certificação Zend do PHP.

Links, arquivos, pedaços de códigos importantes para a certificação