⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sync Pipfile with setup.py dependencies | |
# Assumptions: | |
# - You are running in a directory with Pipfile, Pipfile.lock & setup.py | |
# - Your setup.py calls a function named setup() | |
# - setup() is called with keyword arguments of install_requires and dependency_links (can be empty lists) | |
# - All your remote dependencies are HTTPS git | |
import pipfile | |
import ast | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
modprobe ipv6 | |
modprobe udp_tunnel | |
modprobe ip6_udp_tunnel | |
ip link add dev wg0 type wireguard | |
wg setconf wg0 /etc/wireguard/config | |
wg showconf wg0 | |
brctl addbr internet | |
brctl stp internet on | |
ip link set up dev wg0 |
To remove a submodule you need to:
- Delete the relevant section from the .gitmodules file.
- Stage the .gitmodules changes git add .gitmodules
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Run rm -rf .git/modules/path_to_submodule (no trailing slash).
- Commit git commit -m "Removed submodule "
- Delete the now untracked submodule files rm -rf path_to_submodule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void HSV_to_RGB(float h, float s, float v, byte &r, byte &g, byte &b) | |
{ | |
int i; | |
float f,p,q,t; | |
h = constrain(h, 0.0, 360.0); | |
s = constrain(s, 0.0, 100.0); | |
v = constrain(v, 0.0, 100.0); | |
s /= 100; |