Skip to content

Instantly share code, notes, and snippets.

View ApophisLee's full-sized avatar

ApophisLee ApophisLee

View GitHub Profile
@ApophisLee
ApophisLee / Cloud Run & Remix
Created February 14, 2025 00:19 — forked from TheRealFlyingCoder/Cloud Run & Remix
Remix & Cloud Run
So you want to set up remix in cloud run huh? It's pretty simple but i'm going to assume you can figure out most of the GCP UI on your own.
Cloud Run:
Step 1: Create a new service and take note of the service ID
Step 2: Allow all traffic in the /triggers tab
Cloud Build:
Step 1: Set up a Cloud Build trigger on your repo
Step 2: Point the configuration to "cloud build configuration file" at the root of your project
Step 3: Add the following to the substitution variables (so you can keep it safe):
@ApophisLee
ApophisLee / Cloudflare-WARP_Wireguard.md
Created September 4, 2024 16:29 — forked from daemonhorn/Cloudflare-WARP_Wireguard.md
Cloudflare WARP tunnel via Wireguard client

Cloudflare WARP tunnel via Wireguard client

This example provides a simple configuration for a Debian client to have a Cloudflare tunnel while not installing the official Cloudflare WARP client. Note: Tunnel transport outbound to engage.cloudlflare.com on udp/2408 is default, with a dynamic listening udp port and a fwmark for packet matching by wireguard. Any applicable firewall rules may need to be adjusted.

Install dependancies

sudo apt install openresolv wireguard-tools golang git

Get the latest client from Github and build using go

git clone https://github.com/ViRb3/wgcf.git
https://help.ubuntu.com/community/How%20to%20install%20Ubuntu%20on%20MacBook%20using%20USB%20Stick
@ApophisLee
ApophisLee / dnsmasq.conf
Created May 28, 2023 15:52 — forked from jeremyschulman/dnsmasq.conf
Sample dnsmasq.conf file that uses option-82 circuit-id to assign fixed IP address
#domain-needed
bogus-priv
expand-hosts
addn-hosts=/var/lib/dnsmasq/hosts
# interfaces ...
interface=eth1
# DCHP configs ...
@ApophisLee
ApophisLee / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

@ApophisLee
ApophisLee / README.md
Created December 22, 2022 16:04 — forked from troyfontaine/README.md
USG ddclient Upgrade Script

How to use this script?

Why, that's simple! Copy this script to your USG, run chmod +x on it and then, as a user with sudo permission, execute it.

Shamelessly borrowed from Brittanic on the Ubiquiti Unifi forums

How to use it?

Simply run the following command (note, if you are at all security concious-don't run it and instead review the script, then copy it to your USG to execute).

curl https://gist.github.com/troyfontaine/7e6f93e32621177fc9a94e823adc52b5/raw/fix_ddns.sh | sudo bash
@ApophisLee
ApophisLee / applefn.patch
Created December 12, 2022 12:02 — forked from fauxpark/applefn.patch
QMK Apple Fn
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index d9130b5338..3a80ec71bc 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -851,6 +851,10 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
endif
endif
+ifeq ($(strip $(APPLE_FN_ENABLE)), yes)
+ OPT_DEFS += -DAPPLE_FN_ENABLE
@ApophisLee
ApophisLee / revprox.go
Created August 24, 2022 19:01 — forked from JalfResi/revprox.go
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@ApophisLee
ApophisLee / README.md
Created July 21, 2022 14:40 — forked from cerebrate/README.md
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

WARNING

THIS GIST IS EXTREMELY OBSOLETE. DO NOT FOLLOW THESE INSTRUCTIONS. SERIOUSLY.

IF YOU IGNORE THE ABOVE WARNING, YOU AGREE IN ADVANCE THAT YOU DIDN'T GET THESE INSTRUCTIONS FROM ME, THAT I WARNED YOU, AND THAT I RESERVE THE RIGHT TO POINT AND LAUGH MOCKINGLY IF AND WHEN SOMETHING BREAKS HORRIBLY.

I'll do a write-up of current custom-kernel procedures over on Random Bytes ( https://randombytes.substack.com/ ) one day soon.

NOTE

@ApophisLee
ApophisLee / rpi_camera_v4l2_ffmpeg.md
Created July 16, 2022 19:23 — forked from moritzmhmk/rpi_camera_v4l2_ffmpeg.md
using raspberry pi camera with ffmpeg (hardware accelerated)

Using Raspberry Pi Camera with ffmpeg

Capturing video from the rpi camera with ffmpeg can vary from less than 5% to 100% of the CPU (rpi zero) depending on ffmpeg using the hardware acceleration or not.

On many github issues one finds the suggestion of using h264_omx codec to use the gpu - but it does not ship with the default ffmpeg on Raspbian.

Instead I found that one can use the v4l2 driver provided by raspbian to get hardware accelerated h264 output. Also setting the video size will save one from using a (cpu) scale filter.

ffmpeg

capture h264 video from rpi camera