sudo apt-get update
sudo apt-get upgrade -y
sudo snap install microk8s --classic --channel=1.25/stable
sudo microk8s status --wait-ready
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
type StyleRulesCallback<ClassKey extends string = string> = ( | |
props: any, | |
theme: Theme | |
) => StyleRules<ClassKey>; | |
const withPropsStyles = (style: StyleRulesCallback) => ( | |
component: React.ComponentType<any> | |
) => { | |
return forwardRef((props, ref) => { | |
const proxy = (theme: Theme) => style(props, theme); |
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
#!/bin/sh | |
# openvpn learn-address script to manage a hosts-like file | |
# - intended to allow dnsmasq to resolve openvpn clients | |
# addn-hosts=/etc/hosts.openvpn-clients | |
# - written for openwrt (busybox), but should work most anywhere | |
# | |
# Taken from http://openvpn.net/archive/openvpn-users/2006-10/msg00119.html | |
# | |
# Changelog | |
# 2006-10-13 BDL original |
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
# Raspbian PiVPN | |
## load os image | |
install & start "Raspberry Pi Imager" | |
> Operating System > RASPBERRY PI OS LITE (32-BIT) | |
> Storage > Your SD Card | |
> Setting - Set hostname vpn.local | |
> Setting - Enable SSH | |
> Setting - Set username and password |
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
@Resolver() | |
export class HelloResolver { | |
@Authorized() | |
@Query(() => String) | |
hello(): string { | |
return "Hello World"; | |
} | |
} |
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
import R from "ramda"; | |
type Person = { | |
id: number; | |
name: string; | |
type: string; | |
}; | |
function main() { | |
const array: Person[] = [ |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
let &t_SI.="\e[5 q" "SI = INSERT mode | |
let &t_SR.="\e[4 q" "SR = REPLACE mode | |
let &t_EI.="\e[1 q" "EI = NORMAL mode (ELSE) | |
" Auto install VimPlug | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs |
OlderNewer