Skip to content

Instantly share code, notes, and snippets.

View imsmith's full-sized avatar

Ian Smith imsmith

  • Seattle
  • 03:28 (UTC -07:00)
View GitHub Profile
imsmith /
Created August 18, 2023 03:31
GPT-4 prompt generator for DALL-E Space Images
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.jobstores.base import JobLookupError
from app import write_log
from models import Prompt, Image
import random
from flask import Flask
import openai
import models
from extensions import db
import time
imsmith /
Created December 10, 2022 06:58
get obsidian extensions

in <vault>/.obsidian/plugins und the following command

find . -name manifest.json -prune -exec jq -r '"* [\\(.name)](\\(.authorUrl))", "  - \\(.description)"' {} \;
imsmith /
Last active December 10, 2022 06:27
export installed extensions from vscode on the command line
code --list-extensions --show-versions
imsmith /
Created May 24, 2022 21:26 — forked from mbrownnycnyc/
script for use with `nsupdate` to update linux client DNS on a DNS server... in this instance, I am targeting a Windows Server DNS server 2003/2008/2012+. I have manually created the PTR and A records once, and granted the Everyone ACE the "Write" permission in the DACL of the PTR and A records.
#original from
# reply of Phil6196 Oct 1, 2012 at 12:41 AM (EDT)
ADDR=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed -e s/.*://`
echo "update delete $HOST A" > /var/nsupdate.txt
echo "update add $HOST 86400 A $ADDR" >> /var/nsupdate.txt
echo "update delete $HOST PTR" > /var/nsupdate.txt
echo "update add $HOST 86400 PTR $ADDR" >> /var/nsupdate.txt
nsupdate /var/nsupdate.txt
imsmith /
Created May 24, 2022 21:25 — forked from Tras2/
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
imsmith /
Created June 20, 2021 00:46 — forked from ruanbekker/
Install k3s on Alpine Linux
$ apk add --no-cache curl
$ echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab

$ cat > /etc/cgconfig.conf <<EOF
mount {
  cpuacct = /cgroup/cpuacct;
  memory = /cgroup/memory;
  devices = /cgroup/devices;
  freezer = /cgroup/freezer;
imsmith /
Created June 9, 2021 02:16 — forked from iafisher/
Programmatically access your Firefox bookmarks
A script to automatically export bookmarks from Firefox's SQLite database.
There does not seem to be a programmatic way to get Firefox to export its bookmarks in
the conventional HTML format. However, you can access the bookmark information directly
in Firefox's internal database, which is what this script does.
Always be careful when working with the internal database! If you delete data, you will
likely not be able to recover it.
imsmith / pandoc.Makefile
Created May 21, 2021 01:25 — forked from bertvv/pandoc.Makefile
Makefile for Markdown -> PDF using pandoc
# Generate PDFs from the Markdown source files
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc
# - LuaLaTeX
# - DejaVu Sans fonts
# Directory containing source (Markdown) files
source := src
imsmith /
Created April 6, 2021 20:27 — forked from chriswayg/
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
set -o errexit
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
imsmith /
Created May 7, 2020 19:00 — forked from pamolloy/
Mesh network using VXLAN over Wireguard