Skip to content

Instantly share code, notes, and snippets.

@allex
allex / self-signed-certificate-with-custom-ca.md
Created June 8, 2021 14:06 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@allex
allex / kubernetes-dashboard.md
Created August 2, 2021 15:08 — forked from tonysneed/kubernetes-dashboard.md
Kubernetes Dashboard
  1. Install the dashboard
    • Run: kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
  2. Create admin-user
    • Create a file named: dashboard-adminuser.yaml
    • Add this content:
apiVersion: v1
kind: ServiceAccount
metadata:
@allex
allex / Dockerfile
Created January 12, 2022 14:47 — forked from shov/Dockerfile
Docker PHP 7.2 fpm with GD jpg, png suppot
FROM php:7.2-fpm
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# make sure apt is up to date
RUN apt-get update --fix-missing
RUN apt-get install -y curl
RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev

NOTE -

  • Remove -h option if you are doing operation on same machine
  • Remove -u , -p option if your database don't have username and password

Binary

Import database

mongorestore -h IP:port -d DB_Name -u user_name -p password <input db directory>
@allex
allex / GNU-Make.md
Created February 3, 2023 10:47 — forked from rueycheng/GNU-Make.md
GNU Make cheatsheet
@allex
allex / remotessh.go
Created July 4, 2023 06:02 — forked from tobgu/remotessh.go
Remote ssh exec using Go
package main
import (
"bufio"
"fmt"
"golang.org/x/crypto/ssh"
"io"
"log"
"os"
"strconv"
@allex
allex / update-v2ray-geo.sh
Last active July 14, 2023 07:00 — forked from maddie/update-v2ray-geo.sh
Script for updating V2Ray geoip.dat and geosite.dat on OpenWRT
#!/bin/sh
# GistID: 12011d02da2e8b605a6cb715debb35f8
# GistURL: https://gist.github.com/allex/12011d02da2e8b605a6cb715debb35f8
LOGGER_TAG=v2ray-geodata-updater
log () {
echo "$@"
logger -t $LOGGER_TAG -- "$@"
@allex
allex / frps.sh
Created December 9, 2024 02:27 — forked from fenying/frps.sh
The frp server service script /etc/init.d/frps
## File: /etc/init.d/frps
#!/bin/sh
#
# frps: FRP-Server Daemon
#
# description: FRP-Server Daemon
PID_FILE=/run/frps.pid
CONFIG_FILE=/etc/frps.ini
FRP_SERVER=/usr/local/frps/frps
start()