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 / 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"
@kuang-da
kuang-da / popos-fcitx5.md
Last active July 1, 2024 07:30
[PopOS 安装 fcitx5] #Linx

PopOS 安装 fcitx5

简介

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

输入法平台

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

@triangletodd
triangletodd / README.md
Last active September 13, 2024 10:07
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
@advaith1
advaith1 / intents.md
Last active September 19, 2024 18:15
Discord Gateway Intents Explainer

Intents Explainer

If you're wondering what Gateway Intents are, what Privileged Intents are, why your bot can't see statuses, or why your bot can't see member joins anymore, then this page should explain it to you!

if you do not know what intents are, please read this entire page

Intro

First, a short explanation of how bots work: bots can make requests over the REST (HTTP) API to retreive information and do actions, and they get real-time updates from Discord in the form of websocket gateway events. They can also fetch server members via the gateway.

Examples of gateway events you are probably familiar with are Message Create (a message was sent) and Guild Member Add (a user joined a server).

@qdm12
qdm12 / README.md
Last active September 19, 2024 03:44
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.

Assumptions

This should fit most setups (not mine though 😉)

@meigwilym
meigwilym / CQRS.md
Last active August 19, 2024 08:45
CQRS, Task Based UIs, Event Sourcing agh!

CQRS, Task Based UIs, Event Sourcing agh!

Posted by gregyoung on February 16, 2010

Many people have been getting confused over what CQRS is. They look at CQRS as being an architecture; it is not. CQRS is a very simple pattern that enables many opportunities for architecture that may otherwise not exist. CQRS is not eventual consistency, it is not eventing, it is not messaging, it is not having separated models for reading and writing, nor is it using event sourcing. I want to take a few paragraphs to describe first exactly what CQRS is and then how it relates to other patterns.

CQRS Command and Query Responsibility Segregation

Starting with CQRS, CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query (the same definition that is used by Meyer in Command and Query Separation, a command is any method that mutates state and a query is any method that returns a value).

@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active September 21, 2024 10:48 — forked from developius/README.md
Set up GitHub push with SSH keys

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"
@dmaze
dmaze / k8s-services.yaml
Created January 17, 2018 01:45
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}
@xmlking
xmlking / docker-compose.yml
Last active March 24, 2023 01:12
cassandra healthcheck and dependency for docker compose
version: '2.1'
services:
cassandra:
image: cassandra:latest
networks:
- reactive-network
volumes:
- cassandra_data:/var/lib/cassandra
# - ${PWD}/data/cassandra/data:/var/lib/cassandra