Skip to content

Instantly share code, notes, and snippets.

@surma
surma / README.md
Last active January 4, 2025 01:26
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@jcarrano
jcarrano / generate_openvpn_config.sh
Last active April 24, 2019 08:19 — forked from dmytro/generate_openvpn_config.sh
Script for OpenVPN generate client config file.
#!/bin/bash
# Easy script to create OpenVPN client configuration with the user, pre-generating user's
# RSA key and certificate.
#
# Configuration template must exist in the same directory, with only missing part: certificates.
#
# (c) Dmytro Kovalov, 2015
# Modified by Juan Carrano, 2018
cd $(dirname ${BASH_SOURCE[0]})
//Finds an unknown point distance L along a quadratic curve from a known point.
//Alex Pilafian 2017 - [email protected] - github.com/sikanrong
//If you reuse this code please give me attribution, my dude! I worked hard on this.
//parabola defined by ax^2 + bx + c, a and b are passed in to constructor while c is omitted because it isn't relevant to our calculations.
//u is known point x-value
//L is known length to travel down the curve for our unknown point.
//v is the unknown point x-value, once we have v we can calculate the correspondiing unknown y just by pluging it
//back into our parabola function
@antonorlov
antonorlov / .block
Last active February 28, 2024 14:57
Radial Bar Chart built with D3
license: gpl-3.0
@Kcnarf
Kcnarf / .block
Last active October 15, 2024 21:38
Distorded Treemap - d3-shaped treemap
license: gpl-3.0
height: 500
border: no
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active January 9, 2025 12:22
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@dmytro
dmytro / generate_openvpn_config.sh
Last active August 12, 2024 23:04
Script for OpenVPN generate client config file.
#!/bin/bash
# Easy script to create OpenVPN client configuration with the user, pre-generating user's
# RSA key and certificate.
#
# Configuration template must exist in the same directory, with only missing part: certificates.
#
# (c) Dmytro Kovalov, 2015
#
cd $(dirname ${BASH_SOURCE[0]})
@midwire
midwire / reset_routing_table.sh
Last active October 23, 2024 21:58
[Reset routing table on OSX] #osx #devops #networking
#!/usr/bin/env bash
# Reset routing table on OSX
# display current routing table
echo "********** BEFORE ****************************************"
netstat -r
echo "**********************************************************"
for i in {0..4}; do
sudo route -n flush # several times
@narirou
narirou / gulpfile.js
Last active May 4, 2020 14:02
gulpfile.js : auto restart & livereload the server with gulp
'use strict';
var gulp = require( 'gulp' ),
gutil = require( 'gulp-util' ),
fork = require( 'child_process' ).fork,
tinyLr = require( 'tiny-lr' ),
async = require( 'async' );
var dirs = {
app: [
@XVilka
XVilka / TrueColour.md
Last active April 27, 2025 10:17
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!