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
#!/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 ]
@nicolasdanelon
nicolasdanelon / gist:562f4c6ae0cd349cbb2b
Last active August 29, 2015 14:15
Adding modules for VirtualBox in ArchLinux
#
# About VirtualBox (kernel modules)
# https://wiki.archlinux.org/index.php/VirtualBox#Install_the_VirtualBox_kernel_modules
#
# About kernel modules in ArchLinux
# https://wiki.archlinux.org/index.php/Kernel_modules#Automatic_module_handling
#
# Create this file:
@nicolasdanelon
nicolasdanelon / 01_result.txt
Last active March 15, 2016 15:36
Node JS vs PHP Fibonacci Sequence
Today:
Tue Mar 15 12:32:35 ART 2016
PHP Version:
PHP 7.0.4 (cli) (built: Mar 5 2016 09:28:27) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
NodeJS Version:
v5.8.0

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

{ 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 {
@nicolasdanelon
nicolasdanelon / cirujana.php
Last active October 2, 2023 21:19
type of cirujana
<?php
use App\valueObjects\tipoPersona;
class cirujana extends personaNormal {
public function __construct($paramVisual, $paramMoral): void
{
parent::construct();
}
.plinth
display: block
width: 0
height: 0
border-style: solid
&.p-hero
position: absolute
z-index: 50
bottom: 0
@nicolasdanelon
nicolasdanelon / app.js
Last active June 15, 2018 17:35
super calculadora
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.state = {
first: 0,
second: 0,
@nicolasdanelon
nicolasdanelon / arr.js
Created July 17, 2018 14:36
moment - meses abreviados en español - shot months spanish
import moment from 'moment';
import momentEs from 'moment/locale/es';
moment.updateLocale(momentEs);
const monthsShort = ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'];
moment.updateLocale('es', { monthsShort: m => (m ? monthsShort[m.month()] : monthsShort) });
@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;