Skip to content

Instantly share code, notes, and snippets.

/*
TwineTubular
A twine macro for making YouTube powered background images
Hacked mercilessly into twine by Jonathan Prior
http://jonathanprior.com
HOW TO USE
<<playvideo RWgg5-kUSho 0>>
@jpsarda
jpsarda / WaveExplo.shader
Last active August 3, 2022 05:10
Unity (pro) post processing explosion wave effect (need GoKit library). You call it like this : WaveExploPostProcessing.Get().StartIt(myVector2Position);
Shader "Custom/WaveExplo" {
Properties {
_MainTex ("", 2D) = "white" {}
_CenterX ("CenterX", Range(-1,2)) = 0.5
_CenterY ("CenterY", Range(-1,2)) = 0.5
_Radius ("Radius", Range(-1,1)) = 0.2
_Amplitude ("Amplitude", Range(-10,10)) = 0.05
}
SubShader {
var reducePath = function (x, y, entryOffset, rangeOffset, entryRequiredWall, entryDisallowedWall) {
var rangeEntryRequiredDirections = [entryDisallowedWall, OppositeDirections[entryDisallowedWall]];
var rangeEntryDisallowedDirections = [entryRequiredWall, OppositeDirections[entryRequiredWall]];
var endDisallowedDirections = [OppositeDirections[entryRequiredWall], OppositeDirections[entryDisallowedWall]];
var endRequiredDirections = [entryRequiredWall, entryDisallowedWall];
var tile = tiles[x][y];
var color = tile.color;
var entry = tiles[x+entryOffset[0]][y+entryOffset[1]];
@Justasic
Justasic / openvpn_gen.py
Created November 8, 2015 06:24
This is a python script to generate client OpenVPN configuration files. This is based mostly on the easyrsa script and is much simpler to understand.
import os
import socket
from OpenSSL import crypto, SSL
# OpenVPN is fairly simple since it works on OpenSSL. The OpenVPN server contains
# a root certificate authority that can sign sub-certificates. The certificates
# have very little or no information on who they belong to besides a filename
# and any required information. Everything else is omitted or blank.
# The client certificate and private key are inserted into the .ovpn file
# which contains some settins as well and the entire thing is then ready for