Skip to content

Instantly share code, notes, and snippets.

View iloveitaly's full-sized avatar

Michael Bianco iloveitaly

View GitHub Profile
@iloveitaly
iloveitaly / fiximagelinks.php
Created November 15, 2013 11:05
WordPress: Sets default image link to blank, removed all existing image links
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"provider": {
"type": "string",
"description": "The provider to use"
},
"buildAptPackages": {
"items": {
"type": "string"
@iloveitaly
iloveitaly / radar.py
Created July 27, 2025 02:45
Python Forward Geocode for Radar
import httpx
import sentry_sdk
from pydantic import BaseModel
from tenacity import (
retry,
retry_if_exception_type,
stop_after_attempt,
wait_exponential,
)
@iloveitaly
iloveitaly / capybara_fill_stripe_elements.rb
Created March 4, 2017 21:21
Fill in a Stripe Elements (https://stripe.com/docs/elements) credit card field using capybara
def fill_stripe_elements(card)
using_wait_time(15) { within_frame('stripeField_card_element0') do
card.to_s.chars.each do |piece|
find_field('cardnumber').send_keys(piece)
end
find_field('exp-date').send_keys("0122")
find_field('cvc').send_keys '123'
find_field('postal').send_keys '19335'
end }
@iloveitaly
iloveitaly / vpn-utilities.applescript
Created July 3, 2010 19:05
Configure / create VPN connections via applescript
-- Author: Michael Bianco <http://mabblog.com/>
-- Some help from: http://discussions.info.apple.com/message.jspa?messageID=10363317
on create_vpn_service(vpn_name)
tell application "System Preferences"
reveal pane "Network"
activate
tell application "System Events"
tell process "System Preferences"
@iloveitaly
iloveitaly / direnv.plugin.zsh
Last active December 9, 2024 13:14
zinit plugin for direnv
# make sure you execute this *after* asdf or other version managers are loaded
# direnv is go, really fast, no need to cache
if (( $+commands[direnv] )); then
source <(direnv hook zsh)
# if you open up a new shell in a directory with direnv, it won't be executed until you
# execute a command. This executes any .envrc file immediately.
_direnv_hook
fi
# make sure you execute this *after* asdf or other version managers are loaded
cache_file="${0:A:h}/alias_cache.zsh"
if (( $+commands[gh] )); then
if [[ ! -f "$cache_file" || ! $(/usr/bin/find "$cache_file" -mtime -15 2>/dev/null) ]]; then
gh copilot alias -- zsh > "$cache_file"
gh completion --shell zsh >> "$cache_file"
fi
# make sure you execute this *after* asdf or other version managers are loaded
plugin_dir="${0:A:h}"
cache_file="$plugin_dir/_rg"
if (( $+commands[rg] )); then
if [[ ! -f "$cache_file" || ! $(/usr/bin/find "$cache_file" -mtime -15 2>/dev/null) ]]; then
rg --generate=complete-zsh > "$cache_file"
fi
# make sure you execute this *after* asdf or other version managers are loaded
plugin_dir="${0:A:h}"
cache_file="$plugin_dir/_pnpm"
if (( $+commands[pnpm] )); then
if [[ ! -f "$cache_file" || ! $(/usr/bin/find "$cache_file" -mtime -15 2>/dev/null) ]]; then
pnpm completion zsh > "$cache_file"
fi
# make sure you execute this *after* asdf or other version managers are loaded
# just is rust, so we don't need to cache
if (( $+commands[just] )); then
source <(just --completions zsh)
fi