Skip to content

Instantly share code, notes, and snippets.

@15cm
15cm / compinit-oh-my-zsh.zsh
Last active November 1, 2021 15:01 — forked from ctechols/compinit.zsh
Speed up zsh compinit by only checking cache once a day.
# compinit optimization for oh-my-zsh
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
@15cm
15cm / ddns-start.sh
Last active February 18, 2018 04:38 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in sh(For ASUS Merlin)
#!/bin/bash
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_names="*.a.example.com"
record_names="$record_names a.example.com"