Skip to content

Instantly share code, notes, and snippets.

View justdomepaul's full-sized avatar
🏠
Working from home

Maxfocker justdomepaul

🏠
Working from home
View GitHub Profile
@justdomepaul
justdomepaul / popos-fcitx5.md
Created January 31, 2024 01:48 — forked from kuang-da/popos-fcitx5.md
[PopOS 安装 fcitx5] #Linx

PopOS 安装 fcitx5

简介

Linux 的输入法跟 Windows 和 mac OS 相比略有些不同,主要在于多了一个输入法平台的概念,并且有很多的输入法可以选择,着实让人头晕。今天根据几篇博文,我以安装 fcitx 为主线,梳理了一下输入法的安装过程和遇到的问题。

输入法平台

在使用 Windows 和 mac OS 时,我们通常直接选择输入法,例如搜狗输入法,百度输入法。但是在 Linux 系统中我们第一步是选择输入法平台,不同的平台下有各自的输入法。目前市面上的输入法平台有三种 iBus, fcitx,fcitx5。我主要推荐 Fcitx5。

@justdomepaul
justdomepaul / README.md
Created October 14, 2023 05:10 — forked from triangletodd/README.md
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@justdomepaul
justdomepaul / go_cpu_memory_profiling_benchmarks.sh
Created April 3, 2023 14:45 — forked from arsham/go_cpu_memory_profiling_benchmarks.sh
Go cpu and memory profiling benchmarks. #golang #benchmark
go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./package | tee bench.txt
go tool pprof -http :8080 cpu.out
go tool pprof -http :8081 mem.out
go tool trace trace.out
go tool pprof $FILENAME.test cpu.out
# (pprof) list <func name>
# go get -u golang.org/x/perf/cmd/benchstat
benchstat bench.txt
@justdomepaul
justdomepaul / tool.go
Created April 3, 2023 11:49
Golang Auth0 Verify idToken Tool
package auth0
import (
"crypto/rsa"
"encoding/base64"
"fmt"
"github.com/go-jose/go-jose/v3/jwt"
jwtPkg "github.com/golang-jwt/jwt"
"github.com/tidwall/gjson"
"io"

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@justdomepaul
justdomepaul / schema.graphql
Last active March 19, 2023 16:39
initial schema graphql
scalar Int32
scalar Int64
scalar Uint
scalar Uint32
scalar Uint64
scalar Time
directive @goModel(
model: String
models: [String!]
@justdomepaul
justdomepaul / server.go
Last active November 20, 2022 14:25
inital graphql demo server
package main
import (
"log"
"net/http"
"os"
"$PROJECT/internal/graph/generated"
"$PROJECT/internal/graph/resolvers"
"github.com/99designs/gqlgen/graphql/handler"
@justdomepaul
justdomepaul / gqlgen.yml
Last active March 19, 2023 16:40
initla gqlgen yaml
# Where are all the schema files located? globs are supported eg src/**/*.graphqls
schema:
- internal/schema/*.graphql
# Where should the generated server code go?
exec:
filename: internal/graph/generated/generated.go
package: generated
# Uncomment to enable federation
@justdomepaul
justdomepaul / fcitx-chewing.png
Created November 23, 2020 02:12 — forked from tanyuan/fcitx-chewing.png
Ubuntu: fcitx + chewing 新酷音輸入法
fcitx-chewing.png
@justdomepaul
justdomepaul / k8s-services.yaml
Created November 27, 2018 05:32 — forked from dmaze/k8s-services.yaml
Very minimal Kubernetes NodePort/LoadBalancer services
---
apiVersion: v1
kind: ConfigMap
metadata: {name: content}
data:
index.html: '<html><body><h1>Hello world</h1></body></html>'
---
apiVersion: apps/v1beta2
kind: Deployment
metadata: {name: lb}