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 / 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 / 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 / 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
module AuthHelper
def http_login
user = 'username'
pw = 'password'
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw)
end
end
module AuthRequestHelper
#
@ianchesal
ianchesal / gist:3316a7fd5466e01871e6
Created September 16, 2014 17:10
Debugging 1Password extension problem with browser signature verification
○ → codesign -dvvv /Applications/Google\ Chrome.app
Executable=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Identifier=com.google.Chrome
Format=bundle with Mach-O thin (i386)
CodeDirectory v=20100 size=186 flags=0x0(none) hashes=3+3 location=embedded
Hash type=sha1 size=20
CDHash=a8d3a44cc2a7957e8d9cd9c6f6eb9124a7e4a9fd
Signature size=8507
Authority=Developer ID Application: Google Inc.
Authority=Developer ID Certification Authority
@ianchesal
ianchesal / terminal_fonts.md
Created September 3, 2014 18:18
Terminal Fonts

Like Menlo but it has a dotted zero a slightly nicer kerning and spacing. Menlo refined if you like.

@ianchesal
ianchesal / .rubocop.yml
Created May 18, 2014 00:20
My ~/.rubocop.yml file
########
# My ~/.rubocop.yml file
#
# Rubocop: https://github.com/bbatsov/rubocop#installation
MethodLength:
Enabled: false
LineLength:
Max: 160