There are 28 static site generators that support AsciiDoc sourcing.
/* | |
* Copyright 2019 Google LLC. | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
var CHECKBOX_COLUMN = 'B'; | |
function onEdit() { | |
var range = SpreadsheetApp.getActiveRange(); | |
if (range.getA1Notation().split(/\d/)[0] == CHECKBOX_COLUMN && |
float hash (float2 n) | |
{ | |
return frac(sin(dot(n, float2(123.456789, 987.654321))) * 54321.9876 ); | |
} | |
float noise(float2 p) | |
{ | |
float2 i = floor(p); | |
float2 u = smoothstep(0.0, 1.0, frac(p)); | |
float a = hash(i + float2(0,0)); |
/** | |
* All the assertion code below the line could be replaced with | |
* this single line by using env-var | |
*/ | |
env.get(MAX_BATCH_SIZE).required().asIntPositive() | |
// ----------------------------------------------- | |
const assert = require('assert'); |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* |
import matplotlib.pyplot as plt | |
# Plot model history more easily | |
# when plotting, smooth out the points by some factor (0.5 = rough, 0.99 = smooth) | |
# method taken from `Deep Learning with Python` by François Chollet | |
def smooth_curve(points, factor=0.75): | |
smoothed_points = [] | |
for point in points: |
A collection of useful C# extension methods for the Unity engine. |
If you want to SSH to a VPS which is running openVPN do the following:
source: https://serverfault.com/questions/659955/allowing-ssh-on-a-server-with-an-active-openvpn-client
The problem is that the default gateway gets changed by OpenVPN, and that breaks your current SSH connection unless you set up appropriate routes before you start OpenVPN.
What follows works for me. It uses iptables and ip (iproute2). Below, it is assumed that the default gateway interface before OpenVPN is started is "eth0". The idea is to ensure that when a connection to eth0 is made, even if eth0 is not the default gateway interface anymore, response packets for the connection go back on eth0 again.
You could use the same number for the connection mark, firewall mark and routing table. I used distinct numbers to make the diffences between them more apparent.