Skip to content

Instantly share code, notes, and snippets.

View mariogrieco's full-sized avatar

Mario Grieco mariogrieco

View GitHub Profile
@mariogrieco
mariogrieco / ChartUsingCustomTooltip.js
Created November 29, 2021 00:43 — forked from Muzietto/ChartUsingCustomTooltip.js
Recharts Tooltip: how to show only the value of ONE data point inside a tooltip
import React from 'react';
import {
LineChart,
Line,
XAxis,
YAxis,
CartesianGrid,
ReferenceLine,
Tooltip,
} from 'recharts';
@mariogrieco
mariogrieco / Git
Created August 13, 2021 19:46 — forked from davidportella/Git
Resumen de comandos Git
#############################################
# Push de la rama actual
git push origin $rama_actual
# Otra forma para evitar tener que poner el nombre de la rama es
# cambiar la configuración de git para push de solo la rama actual
git config --global push.default current
git push
# Cambiar la direccion del repositorio remoto
/**
* Get path data for a rounded rectangle. Allows for different radius on each corner.
* @param {Number} w Width of rounded rectangle
* @param {Number} h Height of rounded rectangle
* @param {Number} tlr Top left corner radius
* @param {Number} trr Top right corner radius
* @param {Number} brr Bottom right corner radius
* @param {Number} blr Bottom left corner radius
* @return {String} Rounded rectangle SVG path data
*/
@mariogrieco
mariogrieco / Activate Office 2019 for macOS VoL.md
Created May 1, 2021 15:47 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@mariogrieco
mariogrieco / Activate Office 2019 for macOS VoL.md
Created May 1, 2021 15:47 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@mariogrieco
mariogrieco / comandos git.txt
Created April 27, 2020 03:07 — forked from luismayta/comandos git.txt
Comandos de Git
listar los branch
git branch -l
listar branch remotes
git branch -r
eliminar un branch local
git branch -d <branch>
eliminar un branch remoto
@mariogrieco
mariogrieco / zoom_install.sh
Created December 15, 2019 22:44 — forked from whizzzkid/zoom_install.sh
Installs Zoom meeting client on linux
# To install run:
# bash -c "$(curl -fsSL http://bit.ly/zoom-install)"
sudo apt install libglib2.0-0 libgstreamer-plugins-base0.10-0 libxcb-shape0 libxcb-shm0 libxcb-xfixes0 libxcb-randr0 libxcb-image0 libfontconfig1 libgl1-mesa-glx libxi6 libsm6 libxrender1 libpulse0 libxcomposite1 libxslt1.1 libsqlite3-0 libxcb-keysyms1 libxcb-xtest0;
cd /tmp;
wget https://zoom.us/client/latest/zoom_amd64.deb;
sudo dpkg -i zoom_amd64.deb
# Install Node.js
sudo dnf install nodejs
#Install React Native
sudo npm install -g react-native-cli
sudo mount -o remount,size=50G /tmp/
# Download and install Android Studio
# https://developer.android.com/studio/install.html

Redux Selector Pattern

Imagine we have a reducer to control a list of items:

function listOfItems(state: Array<Object> = [], action: Object = {}): Array<Object> {
  switch(action.type) {
    case 'SHOW_ALL_ITEMS':
      return action.data.items
    default:
@mariogrieco
mariogrieco / quote.txt
Created March 23, 2018 21:24 — forked from OnesimusUnbound/quote.txt
Programming Quotes
[T]he difference between a bad programmer and a
good one is whether he considers his code or his
data structures more important. Bad programmers
worry about the code. Good programmers worry about
data structures and their relationships.
-- Linus Torvalds
~~~
Clarity and brevity sometimes are at odds.
When they are, I choose clarity.
-- Jacob Kaplan-Moss