Skip to content

Instantly share code, notes, and snippets.

View nicolasdanelon's full-sized avatar
🖖
live long and prosper

Nicolas Danelon nicolasdanelon

🖖
live long and prosper
View GitHub Profile
@nicolasdanelon
nicolasdanelon / nginx-example.com.conf
Created April 12, 2019 20:19 — forked from akirattii/nginx-example.com.conf
Typical example of nginx (v1.10.3) conf file for using ssl and collaboration with nodejs app
# nginx conf file example in the case of using:
# - nodejs app server
# - letsencrypt for SSL
# version: nginx/1.10.3
# /etc/nginx/conf.d/example.com.conf
# Permits for tester to access even if web server is under maintenance:
geo $allow_ip_flag {
default 0; # Not Allowed
@nicolasdanelon
nicolasdanelon / store.js
Created August 14, 2018 13:12 — forked from FMCorz/store.js
Fallback on cache when Axios reports a network error
import Axios from 'axios';
import { setupCache } from 'axios-cache-adapter';
import exclude from 'axios-cache-adapter/src/exclude';
// Define the cache adapter.
const cacheAdapter = setupCache({
clearOnStale: false,
});
const getKey = cacheAdapter.config.key;
.plinth
display: block
width: 0
height: 0
border-style: solid
&.p-hero
position: absolute
z-index: 50
bottom: 0
{ pkgs ? import <nixpkgs> { } }:
let
kernel_version = "4.4.52";
kernel-sha256 = "e8d2ddaece73e1a34e045bbdcdcc1383f658e24537797f8d8e0dd520cf1b1f06";
nix_version = "1.11.9";
nix-sha256 = "0e943e277f37843f9196b0293cc31d828613ad7a328ee77cd5be01935dc6e7e1";
in rec
{
linux-tarball = pkgs.fetchurl {

How To Run OpenVPN in a Docker Container

Introduction

This tutorial will explain how to setup and run an OpenVPN container with the help of Docker.

OpenVPN provides a way to create virtual private networks (VPNs) using TLS (evolution of SSL) encryption. OpenVPN protects the network traffic from eavesdropping and man-in-the-middle (MITM) attacks. The private network can be used to securely connect a device, such as a laptop or mobile phone running on an insecure WiFi network, to a remote server that then relays the traffic to the Internet. Private networks can also be used to securely connect devices to each other over the Internet.

Docker provides a way to encapsulate the OpenVPN server process and configuration data so that it is more easily managed. The Docker OpenVPN image is prebuilt and includes all of the necessary dependencies to run the server in a sane and stable environment. Scripts are included to significantly autom

#!/bin/bash
# uses imagemagick to stich together all images in a folder and
# then writes a css file with the correct offsets along with a
# test html page for verification that its all good
if [ $# -gt 0 ]
then
if [ $3 ]