Skip to content

birkhoff.me

Using Backblaze B2 and Cloudflare Workers for free image hosting

https://blog.jross.me/free-personal-image-hosting-with-backblaze-b2-and-cloudflare-workers/ Uses ShareX to upload images to free Blackblaze B2 space, proxies the requests thru Cloudflare CDN, while utilizing Cloudflare Workers to remove the unwanted components in the HTTP responses. Thought it would be useful in the future. Saving it here so I’ll be able to find it later.

Read more »

Switching to the OpenSSL version of cURL on macOS

Recently I’ve been annoyed by the strange cURL SSL errors that have been producing on my macOS. I’ve read that reinstalling cURL with option --with-openssl solves the issue, but it turns out to be error: invalid option: --with-openssl. I’ll go straight to the point: homebrew team removed all install options for curl recently, and people should use curl-openssl instead. So run the following to switch: $ brew upgrade $ brew uninstall curl $ brew install curl-openssl $ echo 'export PATH="/usr/local/opt/curl-openssl/bin:$PATH"' >> ~/.

Read more »

Changing default gateway in Unifi Security Gateway (USG)

I’ve recently replaced my home network hardware with the Unifi family, and I’ve been satisified about them. I live in China, and I have a Linux box that runs transparent proxy. I need to change the DHCP default gateway to something else, but it was nowhere found in the GUI. After some searching I have the solution here. First SSH into your USG, and do the following: configure show service dhcp-server shared-network-name # check your network name set service dhcp-server shared-network-name NETWORK_NAME_HERE subnet YOUR_SUBNET_HERE default-router NEW_GATEWAT_IP delete service dhcp-server shared-network-name NETWORK_NAME_HERE subnet YOUR_SUBNET_HERE dns-server ORIGINAL_DNS_IP set service dhcp-server shared-network-name NETWORK_NAME_HERE subnet YOUR_SUBNET_HERE dns-server NEW_DNS_IP commit save exit Remember to follow this to make the config persistant.

Read more »

Solution to Battlefield V keeping crashing on Win10

Today I wanted to play BFV and upon launching it just crashes without any error message. My environment: i7-7700k, overclocked to 4.8 GHz 2 * 8 GiB 3200 MHz RAM NVIDIA RTX 2080 overclocked 240 Hz monitor DX12, DXR on, FFR off I fixed it by doing the followings: When playing BFV, make sure you do NOT overclock your GPU. You can still use Afterburner and RTSS as long as you set the application detection level to high in RTSS, otherwise the game will crash.

Read more »

Setting up a WireGuard server on OpenWRT

Sometimes it can be useful to be able to connect back to your home network to access some internal resources. I’ll share how I set up a WireGuard server on OpenWRT. First install some WireGuard packages. $ opkg update $ opkg install kmod-wireguard luci-app-wireguard luci-proto-wireguard wireguard wireguard-tools Next go to https://openwrt/cgi-bin/luci/admin/network/iface_add, name the VPN interface wg0, select WireGuard VPN for Protocol of the new interface and press submit. We need to generate some keypairs for the server and clients.

Read more »

Running Clash on OpenWrt as a transparent proxy

I will revamp this post soon as Clash is going to have major changes. As you would have been aware of that I live in China where internet is under strict censorship. I’ve been discovering ways to access the blocked internet resources. So recently I switched to a x86 mini computer that runs Proxmox VE, which has an OpenWRT VM running as a router. In this blog post, I’m using Clash, a new software that is quite the same to Surge.

Read more »

Change GRUB timeout in OpenWrt to speed up boot process

Recently I’m playing with my OpenWrt router on a PVE machine, and I noticed that there’s a 5 second timeout in the boot procedure. It’s important to have a router boot up fast. So I searched online how to change the timeout setting. Unfortunately OpenWrt isn’t Debian, while most tutorials I found online is Debian or RHEL. So stuff works quite differently. After some digging I found that you can actually override /boot/grub/grub.

Read more »

Build tmux on CentOS 7

So I have been recently annoyed with some super strange display issues that tmux 2.7 on my server produces. After some digging I decided to re-build version 2.8 (which is the latest release as of time of writing) of tmux. We’ll be grabbing the official tmux repo from https://github.com/tmux/tmux, build version 2.8 and install it. Note that you’ll need root privileges to install tmux. $ sudo yum remove tmux # remove old version of tmux $ git clone https://github.

Read more »

Solve "The Firebase CLI login request was rejected or an error occurred" when using a proxy on macOS

TL;DR: Use Proxifier if you’re using a HTTP/SOCKS proxy Today I tried to login to Firebase CLI I ran into an issue that stopped me from logging in. After approving the login request on Google’s login page, the page kept loading something (a page served on localhost) and eventually it went to this page: In CLI: ▶ firebase login --debug [2018-04-13T01:44:43.513Z] ---------------------------------------------------------------------- [2018-04-13T01:44:43.518Z] Command: /Users/birkhoff/.nvm/versions/node/v6.9.4/bin/node /usr/local/bin/firebase login --debug [2018-04-13T01:44:43.

Read more »

Redirect domains to specific URLs with Traefik v2

Rewritten on Jan 7, 2020. This enables Traefik to redirect for example, foo.birkhoff.me to https://www.google.com. The TLS section is required for a full HTTPS setup. The below is a dynamic configuration, refer to the Traefik docs for the info. http:routers:redirections:service:dummyservicetls:certResolver:acmemiddlewares:- "foo-redirectregex"- "bar-redirectregex"rule:"Host(`foo.birkhoff.me`) || Host(`bar.birkhoff.me`)"middlewares:foo-redirectregex:redirectRegex:regex:"^https?://foo.birkhoff.me"replacement:"https://www.google.com"permanent:truebar-redirectregex:redirectRegex:regex:"^https?://bar.birkhoff.me"replacement:"https://www.twitter.com"permanent:trueservices:dummyservice:loadBalancer:servers:- url:"http://1.

Read more »