Skip to content

Instantly share code, notes, and snippets.

@ianchesal
ianchesal / overrides.lua
Created May 8, 2023 18:45
copilot.lua + copilot-cmp in NvChad
-- Add the following in your custom/configs/overrides.lua file. You can configure copilot to meet your needs here.
M.copilot = {
-- Possible configurable fields can be found on:
-- https://github.com/zbirenbaum/copilot.lua#setup-and-configuration
suggestion = {
enable = false,
},
panel = {
enable = false,
@ianchesal
ianchesal / README.md
Last active August 13, 2023 13:50
Migrating NightScout site from Heroku to Render.com

Migrating NightScout from Heroku to Render.com

!!!! Attention !!!!

These are mostly my rough notes on the process I followed to migrate my NightScout site from Heroku to Render.

They have not been rigorously tested or attempted more than the one time I migrated.

I'm using NightScout with a Dexcom setup. I have no idea if these instructions will work for any other CGM setup.

@ianchesal
ianchesal / fstab
Last active August 23, 2022 11:21
fstab to keep my dead Main drive inside my '07 iMac from mounting at boot time and dragging the whole system down. I copy-and-pasted this from https://gist.github.com/threebytesfull/968327 because GitHub kept through a 500 error every time I'd try to clone that gist. Props to the original author of this solution.
# Original gist: https://gist.github.com/threebytesfull/968327
#
# See also: http://apple.stackexchange.com/questions/17264/prevent-bootcamp-partition-from-automatically-mounting
#
# You can find the volume UUID in Disk Utility. Select the volume on the left
# and then File->Get Info. See "Universal Unique Identifier".
#
# Options used below:
# ro for readonly (can be omitted)
# noauto to prevent auto-mount
@ianchesal
ianchesal / fractal-bot-backup-organizer
Last active June 17, 2022 00:51
Auto-Organize Your Fractal-Bot Backups
#!/usr/bin/env ruby
# ***USE***
# Drop this file into the folder where you have Fractal-Bot storing your
# backups. Name it whatever you like. Run it from time to time and it'll
# sort your backups into sub-folders based on file prefixes.
#
# If you're on a Mac you can use this code as a Folder Automation action and
# it should work just fine and run every time a new file is created in your
# backup folder.
@ianchesal
ianchesal / fargate-content.bash
Created June 30, 2021 19:04
List fargate content in ECS clusters
#!/bin/bash
# Returns the count of Fargate content in each ECS cluster in your account+region.
aws ecs list-clusters 2>/dev/null | jq -c '.clusterArns[]' | while read cluster; do
cluster="${cluster%\"}"
cluster="${cluster#\"}"
cname=$(basename $cluster)
echo "Checking: $cname"
aws ecs list-services --cluster $cname --launch-type FARGATE 2>/dev/null | jq '.serviceArns | length'
@ianchesal
ianchesal / simpledesktops_download.py
Created July 8, 2011 15:37 — forked from compbrain/simpledesktops_download.py
Download simpledesktops.com wallpaper images
#!/usr/bin/python
__doc__ = """
simpledesktops_download.py
A quick script that fetches desktop images from the http://simpledesktops.com/ site.
It will start at the most current list of images and keep moving backwards, downloading
desktop images in to a directory on your local machine, until it finds an image that
already exists on disk. At that point it will stop.
@ianchesal
ianchesal / gist:2998601
Created June 26, 2012 20:14
AskDifferent Question #54791
> dig 54.247.29.171 any
; <<>> DiG 9.7.3-P3 <<>> 54.247.29.171 any
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27993
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;54.247.29.171. IN ANY
@ianchesal
ianchesal / bitbucket2github.sh
Created July 17, 2020 21:38
Convert a bitbucket repository to a github repository
#!/bin/sh
# Usage:
#
# cd ~/src/some-bitbucket-repo
# ~/bin/bitbucket2github.sh
#
# The script assumes the name of the directory is the name
# of the repository that you want to use on github.com.
@ianchesal
ianchesal / brew_list_versions.txt
Created July 26, 2019 06:38
Currently installed brew packages
❯ brew list --versions
adns 1.5.1
aom 1.0.0
autoconf 2.69
awscli 1.16.200
bash-completion 1.3_3
bat 0.11.0_1
cairo 1.16.0_2
exiftool 11.57
ffmpeg HEAD-2d900d8_1
@ianchesal
ianchesal / dirsize.py
Created September 1, 2012 19:40
Figures out the total size of all the sub-directories under a directory
#!/bin/env python
__doc__ = '''
dirsize.py
Figure out the size of everything contained in all the sub-directories under a target
in some sort of parallel manner. Try and produce some output that's not as terrible
to grok as du.