https://superuser.com/questions/229773/run-command-on-startup-login-mac-os-x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (( $+commands[az] )); then | |
autoload -U +X bashcompinit && bashcompinit | |
source $(brew --prefix)/etc/bash_completion.d/az | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure you execute this *after* asdf or other version managers are loaded | |
if (( $+commands[ov] )); then | |
eval "$(ov --completion zsh)" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def setup(): | |
""" | |
Config below is subject to change | |
https://stackoverflow.com/questions/76256249/logging-in-the-open-ai-python-library/78214464#78214464 | |
https://github.com/openai/openai-python/blob/de7c0e2d9375d042a42e3db6c17e5af9a5701a99/src/openai/_utils/_logs.py#L16 | |
""" | |
openai_log_path = taxdocs.root / "openai.log" | |
openai_file_handler = logging.FileHandler(openai_log_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function quit_apps() { | |
for app in $@; do | |
echo "Quitting $app..." | |
osascript -e "with timeout of 30 seconds | |
quit app \"$app\" | |
end timeout" | |
if [ $? -ne 0 ]; then | |
# if the application did not quit on it's own, let's force it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author <mike@suitesync.io> | |
function isUserInterfaceContext() { | |
var context = nlapiGetContext(); | |
var executionContext = context.getExecutionContext(); | |
return executionContext == 'userinterface'; | |
} | |
function startsWith(str, searchString) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure you execute this *after* asdf or other version managers are loaded | |
# bun completions are strange: running `bun completions` installs ~/.bun/_bun and does not output the completion source code | |
# this is a hack until bun fixes their completion setup https://github.com/oven-sh/bun/issues/1272 | |
if (( $+commands[bun] )); then | |
[ -s ~/.bun/_bun ] || bun completions | |
# cannot source directly, must add fpath to completions | |
fpath+=~/.bun/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Michael Bianco <mike@suitesync.io> | |
# Description: Create a Stripe Subscription with required information for Avalara's | |
# Stripe Subscription integration. | |
# Learn more: https://gist.github.com/iloveitaly/7b9b288d203f6ac7f75d8eda14e07c18 | |
# Usage: | |
# | |
# export STRIPE_KEY=sk_test | |
# gem install stripe | |
# ruby stripe_create_subscription_with_avalara.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure you execute this *after* asdf or other version managers are loaded | |
# the default docker completion is not as advanced as this one, you'll want to remove it: | |
# rm $(brew --prefix)/share/zsh/site-functions/_docker | |
# https://github.com/docker/compose/issues/8550 | |
if (( $+commands[docker] )); then | |
eval "$(docker completion zsh)" | |
fi |
NewerOlder