Author:

Quick and useful Docker commands and configs
docker

Quick and useful Docker commands and configs

Here is a list of some docker snippets that I use daily. Create a tagged image from Dockerfile docker build -t tag_name /path/to/ Run a docker image in detached mode docker run -p local_port:remote_port -d tag_name Remove stopped containers docker rm $(docker ps -a

davide
Update ssh to version 7.5p1
ssh

Update ssh to version 7.5p1

Follow the instructions to update ssh on the latest version. The process requires patching the current source, which is unfortunately not written anywhere in the open-ssh website. Package Information -Download (HTTP): http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz Download MD5 sum: 652fdc7d8392f112bef11cacf7e69e23 Download size: 1.

davide
Let's encrypt manual mode using DNS record verification
ssl

Let's encrypt manual mode using DNS record verification

Here is the procedure that I've used to create a letsencrypt certificate in manual mode using a DNS record for registration. sudo letsencrypt certonly -d example.com -d www.example.com --manual --preferred-challenges dns The procedure will guide to the creation of a DNS TXT record used to

davide
Removing the hashbang from react-router navigation

Removing the hashbang from react-router navigation

By default, react-router add the annoying and hated hashbang to the URL, here is how to remove it. import React from 'react'; import ReactDOM from 'react-dom'; import {BrowserRouter, Route, Switch} from 'react-router-dom'; //Container import Full from './containers/Full/' //Views import Login from

davide
Using ARIMA and Box-Jenkins methodology for time series forecast - Part 1
arma

Using ARIMA and Box-Jenkins methodology for time series forecast - Part 1

The Box-Jenkins method, named after George Box and Gwilym Jenkins, is an approach used in time series analysis to find the best fit of a time-series model to past values of a time-series applying Autoregressive Moving Average (ARMA) and Autoregressive Integrated Moving Average (ARIMA). Approach The approach has been referred

davide
ThreeJS rotating icosahedron with images on vertices

ThreeJS rotating icosahedron with images on vertices

Simple clone of the Stripe element @ https://stripe.com/radar I had some fun replicating the rotating icosahedron of the Stripe page, and in the end, it came out pretty good. I know that on Stripe they have created their own solid using Cinema 4d. <!DOCTYPE html> <

davide
Principal Component Analysis

Principal Component Analysis

PCA is an algorithm used to find the principal component of data. Principal components are the directions where there is the most variance, the directions where the data is most spread out. Eigenvectors and Eigenvalues On a set of data, we can deconstruct the set into eigenvectors and eigenvalues. Every

davide
Charge Stripe Processing Fee to the user
javascript

Charge Stripe Processing Fee to the user

Following is how I've implemented the possibility to charge the stripe fee onto the user. Unfortunately, Stripe does not offer any API endpoint to get the stripe fees for a specified country so I had to do it manually. It is not perfect nor elegant but it works.

davide
Change Swap size on a running linux machine
linux

Change Swap size on a running linux machine

Make all swap off sudo swapoff -a Resize the swapfile sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 Make swapfile usable sudo mkswap /swapfile Make swapon again sudo swapon /swapfile

davide