This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Executable transcript of https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04 | |
sudo apt update | |
sudo apt install -y openvpn easy-rsa python | |
make-cadir ~/openvpn-ca | |
cd ~/openvpn-ca | |
cat <<EOT >> vars | |
# New values | |
export KEY_COUNTRY="EE" | |
export KEY_PROVINCE="Some Province" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"day": "Monday", | |
"breakfast": [ | |
"Aloo Parantha", | |
"Omelette" | |
], | |
"lunch": [ | |
"Capsicum Chilli, Raita", | |
"Rajma" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include this code in your notebook to apply the theming | |
import plotly.io as pio | |
# Custom plotly theme for horizon | |
pio.templates["plotly_dark_horizon"] = pio.templates["plotly_dark"] | |
pio.templates["plotly_dark_horizon"]['layout']['paper_bgcolor'] = '#232530' | |
pio.templates["plotly_dark_horizon"]['layout']['plot_bgcolor'] = '#232530' | |
pio.templates.default = 'plotly_dark_horizon' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "right", | |
"segments": [ | |
{ | |
"background": "#29315A", | |
"foreground": "#E64747", | |
"leading_diamond": "\ue0b6", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 | |
Invoke-Expression (&starship init powershell) | |
# Zoxide invoker | |
Invoke-Expression (& { | |
$hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' } | |
(zoxide init --hook $hook powershell) -join "`n" | |
}) | |
# GitKraken function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Default PF configuration file. | |
# | |
# This file contains the main ruleset, which gets automatically loaded | |
# at startup. PF will not be automatically enabled, however. Instead, | |
# each component which utilizes PF is responsible for enabling and disabling | |
# PF via -E and -X as documented in pfctl(8). That will ensure that PF | |
# is disabled only when the last enable reference is released. | |
# | |
# Care must be taken to ensure that the main ruleset does not get flushed, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// There's only so many ways you can do an accumulator in ts | |
type Accumulator<N extends number, Acc extends ReadonlyArray<unknown> = []> = Acc extends { | |
length: N; | |
} | |
? Acc | |
: Accumulator<N, [...Acc, unknown]>; | |
// Make a Union of the indexes excluding 0 | |
type IndexUnion<A extends ReadonlyArray<unknown>> = Exclude< | |
{ |