Skip to content

Instantly share code, notes, and snippets.

View fedecarg's full-sized avatar
There is no spoon

Federico Cargnelutti fedecarg

There is no spoon
View GitHub Profile

Using Lerna to Lint, Test and Copy NPM packages

Lerna allows you to list local packages that have changed since the last release:

$ cd /path/to/node-app
$ npx lerna changed -p

lerna notice cli v3.20.2
lerna info versioning independent
View iberia.json
"currencies": [
"code": "EUR",
"description": "Euro",
"symbol": "€",
"alignment": "L",
"groupingSeparator": ",",
"decimalSeparator": ".",
"decimals": 2,
fedecarg /
Last active November 26, 2019 10:56
Lerna: validate only the packages that have changed since the last tagged release
function lerna_lint() {
npx lerna exec $(for package_dir in `npx lerna changed -p`; do echo -n " --scope $(basename ${package_dir})"; done) -- yarn lint
function lerna_test() {
npx lerna exec $(for package_dir in `npx lerna changed -p`; do echo -n " --scope $(basename ${package_dir})"; done) -- yarn test
function validate() {


Goal of the SRE team

The main goal of the Site Reliability Engineering (SRE) team is to create scalable and highly reliable software systems that fit any particular situation, and feedback mechanisms to provide insight into options for optimising these systems.

The contribution of the SRE team results in strict improvements across the following areas: software development, availability, performance, efficiency, change management, monitoring, emergency response, and capacity planning.

Responsibilities of the SRE team

git checkout master \
&& git fetch -p origin \
&& git branch -r --merged master \
| egrep -v "^ *origin/(master|develop|HEAD -> origin/master)$" \
| grep origin | sed 's/origin\///' \
| xargs -n 1 git push --delete origin
View scroll_container.js
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import throttle from 'lodash.throttle';
import { Container, Placeholder } from './scroll-container.styles';
const ScrollContainer = ({ children, mode, offsetTop }) => {
const [containerPosition, setContainerPosition] = useState('static');
const [placeholderHeight, setPlaceholderHeight] = useState(null);
const placeholderRef = React.useRef(null);
code --install-extension christian-kohler.path-intellisense
code --install-extension davidbwaters.macos-modern-theme
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension formulahendry.code-runner
code --install-extension jpoissonnier.vscode-styled-components
code --install-extension kumar-harsh.graphql-for-vscode
code --install-extension mikaelkristiansson87.react-theme-vscode
code --install-extension msjsdiag.debugger-for-chrome
code --install-extension nemesarial.dust
fedecarg /
Last active November 26, 2019 10:39
Google Ad Manager




Google Publisher Console

8663477 >  CNNi >  health > photos
Slot size: 300x600, 300x250Out of Page: FalseFormat: DivService: Ad Manager
fedecarg /
Last active October 18, 2019 20:32
# Path to your oh-my-zsh installation.
export ZSH="/Users/fed/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See
# Set list of themes to pick from when loading at random
View vsc_react_settings.json
"code-runner.executorMap": {
"javascript": "node"
"code-runner.executorMapByGlob": {
"*.js": "node"
"editor.detectIndentation": false,
"editor.fontFamily": "Menlo",
"editor.fontSize": 12,