Skip to content

Instantly share code, notes, and snippets.

@cherrot
cherrot / docker-download-server.go
Last active June 27, 2022 17:55
A HTTP Server to Download Docker Images with File Cache
package main
import (
"flag"
"fmt"
"os"
"os/exec"
"path"
"strings"
"sync"
@cherrot
cherrot / .vimrc
Created May 12, 2022 18:31
Set a brighter color for Comment and Folded for nord-vim colorscheme
augroup nord-theme-overrides
autocmd!
" `:hi Comment` to check current color for Comment (default is #616e88)
" 5% brighter #6d7a96, 10% brighter #7b88a1 from https://github.com/arcticicestudio/nord-emacs/issues/43
autocmd ColorScheme nord highlight Comment cterm=italic ctermfg=14 guifg=#6d7a96
" Folded by default is #4C566A, which is too dark to recognize.
autocmd ColorScheme nord highlight Folded cterm=italic,bold guifg=#576279
augroup END
colorscheme nord
@cherrot
cherrot / dohclient.go
Last active June 30, 2022 15:32
A DNS-over-HTTPS (DoH) client written in Go, built on miekg/dns
package doh
import (
"encoding/base64"
"errors"
"io"
"net/http"
"time"
"github.com/miekg/dns"
@cherrot
cherrot / ddns-ipv6-cloudflare.py
Last active March 16, 2020 08:36
IPv6 Dynamic DNS (DDNS) for Cloudflare
#!/bin/env python3
import requests
import json
import subprocess
import time
import sys
dns_cloudflare_email = '[email protected]'
dns_cloudflare_api_key = 'YOUR_API_KEY_HERE'