Skip to content

Instantly share code, notes, and snippets.


Pedro Ladaria pladaria

View GitHub Profile
pladaria /
Created Dec 20, 2019 — forked from ipbastola/
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64


Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
pladaria /
Last active Jan 30, 2020
Saga de la Fundación - Orden de lectura

Saga de la Fundación

Serie de los Robots

  • 1950 Yo, Robot
  • 1954 Bóvedas de Acero
  • 1957 El Sol Desnudo
  • 1983 Los Robots del Amanecer
  • 1985 Robots e Imperio
View index.js
const crypto = require('crypto');
const urlBase64 = require('urlsafe-base64');
function generateVAPIDKeys() {
const curve = crypto.createECDH('prime256v1');
return {
publicKey: urlBase64.encode(curve.getPublicKey()),
privateKey: urlBase64.encode(curve.getPrivateKey())
pladaria / sentry-webpack-plugin.js
Created Nov 24, 2017
Sentry artifacts upload plugin for webpack
View sentry-webpack-plugin.js
* Original file:
const request = require('request-promise');
const fs = require('fs');
const crypto = require('crypto');
const {green, yellow, red} = require('colors/safe');
const Queue = require('promise-queue');
pladaria / index.js
Last active Apr 22, 2017
requirebin sketch
View index.js
const RWS = require('reconnecting-websocket');
const rws1 = new RWS('wss://');
const rws2 = new RWS('wss://', undefined);
rws1.onopen = () => console.log('ws1 connected');
rws2.onopen = () => console.log('ws2 connected');
pladaria /
Created Feb 11, 2017 — forked from soheilhy/
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

pladaria /
Created Jan 29, 2017
Simple shell script to deploy heroku services
#!/usr/bin/env bash
DEPLOY_PATH=/tmp/heroku-deploy-`date +%s`/
mkdir -p $DEPLOY_PATH
rsync -av . $DEPLOY_PATH --exclude node_modules
pladaria / .svgo.yml
Last active Jul 16, 2020
SVGO config file
View .svgo.yml
multipass: true
- addAttributesToSVGElement: false
- addClassesToSVGElement: false
- cleanupAttrs: true
- cleanupEnableBackground: true
- cleanupIDs: true
- cleanupListOfValues: true
- cleanupNumericValues:
View riffwave.js
* RIFFWAVE.js v0.03 - Audio encoder for HTML5 <audio> elements.
* Copyleft 2011 by Pedro Ladaria <pedro.ladaria at Gmail dot com>
* Public Domain
* Changelog:
* 0.01 - First release
* 0.02 - New faster base64 encoding
You can’t perform that action at this time.