Skip to content

Instantly share code, notes, and snippets.

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);
#!/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
@hardyscc
hardyscc / raspbian-openvpn.txt
Last active May 12, 2022 07:33
openvpn setup on raspbain
# 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
@hardyscc
hardyscc / HelloResolver.ts
Last active September 21, 2023 10:36
Keycloak Sample - react type-graphql react-router-dom react-keycloak keycloak-js keycloak-connect
@Resolver()
export class HelloResolver {
@Authorized()
@Query(() => String)
hello(): string {
return "Hello World";
}
}
import R from "ramda";
type Person = {
id: number;
name: string;
type: string;
};
function main() {
const array: Person[] = [
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
@hardyscc
hardyscc / gitlab-microk8s.md
Last active August 26, 2023 02:44
Gitlab MicroK8s CI/CD Integration

Gitlab MicroK8s CI/CD Integration

Install microk8s

sudo apt-get update
sudo apt-get upgrade -y

sudo snap install microk8s --classic --channel=1.25/stable
sudo microk8s status --wait-ready
@hardyscc
hardyscc / k8s-keycloak.md
Last active October 22, 2023 08:43
Keycloak Installation on K8s

Install Keycloak

helmfile.yaml (keycloak v22)

releases:
  - name: production
    namespace: keycloak
    chart: oci://registry-1.docker.io/bitnamicharts/keycloak
    version: 17.1.1

Create RocketMQ Operator

  1. Create a separate namespace and set as default

    $ kubectl create namespace rocketmq
    $ kubectl config set-context --current --namespace rocketmq
  2. Install the RocketMQ's Operator into rocketmq namespace

@hardyscc
hardyscc / k8s-cert-manager.md
Last active September 13, 2022 07:53
Cert Manager on Kubernetes

Install Cert Manager

helm repo add jetstack https://charts.jetstack.io
helm repo update

kubectl create namespace cert-manager

helm install cert-manager jetstack/cert-manager \
  --namespace cert-manager \