Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Lucio Paiva luciopaiva

I may be slow to respond.
View GitHub Profile
luciopaiva /
Created Oct 10, 2018
Inspecting changes between commits in git

List files touched:

git diff --stat commit-1 commit-2

List change counts:

git diff --shortstat commit-1 commit-2 | cat

List authors between two commits:


Plex Media Server on Ubuntu

Install it by following the instructions on the web site.

Troubleshooting Plex not seeing media files

Make sure your directories and files have the right permissions:

find . -type f -exec chmod 644 {} ; find . -type d -exec chmod 755 {} ;


Using HTML templates in Javascript

This is the proper way to have HTML templates and clone them in Javascript.

First add the template to your HTML:

<template id="example-template">

Things I learned while playing with Cordova

  • use Webstorm to develop your app
  • deploy via Webstorm (it has a Cordova configuration template)
  • try your app in Chrome by clicking the Chrome button in Webstorm
  • configure JetBrains IDE plugin in Chrome to allow for cross-origin requests
  • your Android app will complain about cross-origin requests as well
  • you can debug your deployed Android app via Chrome through chrome://inspect
  • if you're previewing your page in Chrome, you may need to disable web security in order to use fetch() pointing to other domains. See this
luciopaiva / AWS - obtain data about own
Created Jan 28, 2020
AWS - obtain data about own instance
View AWS - obtain data about own
luciopaiva /
Created Feb 11, 2020
Get AWS own instance type via curl
View Network perf test with

Network perf test with iperf3



In case sudo yum install iperf3 doesn't work:

git clone

cd iperf

View witchcraft-include-directive-example.js
// @include my-script.js
// @include "some other script.js"
/* @include third-script.js */
setup(); // `setup` is defined in `my-script.js`