-
Abstract: This guide provides best practices for writing clear, maintainable, and robust Zsh scripts. Aimed at helping developers transition from Bash to Zsh, particularly on macOS, this guide offers practical advice and examples for creating standardized and efficient scripts.
-
Copyright This text of this guide is Copyright ©️2024 by Christopher Allen, and is shared under spdx:CC-BY-SA-4.0 open-source license. All the example code is relenquished to the public domain under spx:CC0-1.0.
-
Tags: #zsh #scripting #cli #opinionated
how to leverage oracle's temping offers
The limits of the free tier say that you can create up to 4 instances.
- x2 x86 instances (2core/1g)
- x2 ampere instances (with 4core/24g spread between them)
- 200GB total boot volume space across all intances (minimum of 50G per instance)
""" | |
A Python script for downloading all files under a folder in Google Drive. | |
Downloaded files will be saved at the current working directory. | |
This script uses the official Google Drive API (https://developers.google.com/drive). | |
As the examples in the official doc are not very clear to me, | |
so I thought sharing this script would be helpful for someone. | |
To use this script, you should first follow the instruction | |
in Quickstart section in the official doc (https://developers.google.com/drive/api/v3/quickstart/python): |
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# If not, run this: | |
sudo chown -R $USER ~/.gnupg | |
# Then give the right permissions: | |
sudo chmod 700 ~/.gnupg | |
sudo chmod 600 ~/.gnupg/* |
Homebrew makes it easy to install and keep installed software up to date on your Mac - as part of my backup routine for my Mac I want to be able to run a single command to reinstall all packages.
If you're searching on how to backup & restore Homebrew, then I assume you're here for the commands.
Brewfiles are files generated with definitions that Homebrew reads and processes, a generated
#!python3 | |
""" | |
Convert a requirements.txt file to a Poetry project. | |
Just place in the root of your working directory and run! | |
""" | |
sourceFile = "./requirements.txt" | |
import re | |
import os |
"workbench.colorCustomizations": { | |
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast. | |
"contrastActiveBorder": "", | |
"contrastBorder": "", | |
// Base Colors | |
"focusBorder": "", | |
"foreground": "", | |
"widget.shadow": "", | |
"selection.background": "", | |
"descriptionForeground": "", |
import asyncio | |
from confluent_kafka import Consumer, Producer | |
from confluent_kafka.admin import AdminClient, NewTopic | |
BROKER_URL = "PLAINTEXT://localhost:9092" | |
TOPIC_NAME = "my-first-python-topic" | |