DO NOT USE VSCODE terminal and make sure uname -m
returns arm64
- First Install Xcode command line tool
xcode-select --install
- Create and change
/opt
directories owner
import time | |
import duckdb | |
def run_duckdb_query(): | |
# Connect to DuckDB (using an in-memory database as an example) | |
conn = duckdb.connect(database=':memory:') | |
# Load the spatial extension | |
conn.execute("LOAD spatial") |
function gcm | |
# Check if llm is installed, if not, install it | |
if not type -q llm | |
echo "'llm' is not installed. Attempting to install it using pip..." | |
if pip install llm | |
echo "'llm' installed successfully." | |
else | |
echo "Failed to install 'llm'. Please install it manually and try again." | |
return 1 | |
end |
# ----------------------------------------------------------------------------- | |
# AI-powered Git Commit Function | |
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
# 1) gets the current staged changed diff | |
# 2) sends them to an LLM to write the git commit message | |
# 3) allows you to easily accept, edit, regenerate, cancel | |
# But - just read and edit the code however you like | |
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
gcm() { |
/* | |
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield) | |
* for the original concept which was part of their RoamGames submission | |
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/ | |
* | |
*/ | |
/* ======= OPTIONS ======== */ | |
/* note: if you change these, reload the page to see the effect */ |
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
# *** WARNING *** | |
# This gist is no longer maintained | |
# It has been replaced by aws-assume-role-lib in PyPI | |
# Documentation at https://github.com/benkehoe/aws-assume-role-lib | |
# It is still a single-file library, you can find the stable version here: | |
# https://raw.githubusercontent.com/benkehoe/aws-assume-role-lib/stable/aws_assume_role_lib/aws_assume_role_lib.py | |
# (link also available in the docs) | |
# Copyright 2020 Ben Kehoe | |
# |
# MIT No Attribution | |
# | |
# Copyright 2022 Ben Kehoe | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
# software and associated documentation files (the "Software"), to deal in the Software | |
# without restriction, including without limitation the rights to use, copy, modify, | |
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so. | |
# |
Don't do the crime, if you can't do the time.
-- Anthony Vincenzo "Tony" Baretta
Vim is an amazing text editor. I love it. Really, I wouldn't [organize][organize] a Vim advent calendar if I didn't. But, as amazing as it is, Vim is not for everyone. It can't solve all your problems, or be a TUI version of your favorite IDE, or make you a better programmer, or land you that dream job in the Bay Area. But Vim can help you be more mindful, focused, and efficient, as long as you approach it with the right mindset.
Don't get me wrong, I certainly welcome you to try Vim, but I'm not a proselyte. I don't thrive on newbies. I just want you to use the right tool for the job and not waste your—and anyone's—time on a fruitless quest.
import mercantile | |
from shapely.geometry import box, shape | |
from supermercado import burntiles | |
minzoom = 7 | |
maxzoom = 12 | |
maximum_items_per_tile = 20 | |
def stac_to_mosaicJSON(data): | |
dataset = data["features"] |