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

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 / 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}
@justdomepaul
justdomepaul / AES.go
Created November 23, 2018 02:32 — forked from shautzin/AES.go
AES/CBC/PKCS5Padding implementation by Golang
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"fmt"
)
func main() {
@justdomepaul
justdomepaul / multipart_upload.go
Created October 8, 2018 09:46 — forked from mattetti/multipart_upload.go
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@justdomepaul
justdomepaul / docker-compose.yml
Created September 3, 2018 08:48 — forked from thelinuxlich/docker-compose.yml
Redis Cluster with Docker Compose v3
version: "3.1"
services:
redis-master-1:
build: ./
networks:
redisnet:
ipv4_address: 10.0.0.2
command: sh -c "redis-server /src/redis.conf --port 7000 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000"
redis-master-2:
build: ./
@justdomepaul
justdomepaul / GitConfigHttpProxy.md
Created August 29, 2018 05:33 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

##In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like: