This file contains hidden or 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
""" | |
1. Make sure you have `uv` install. (e.g. `brew install uv`) | |
2. Setup Python venv `uv venv && source .venv/bin/activate` | |
3. Setup the model API key (e.g. `export ANTHROPIC_API_KEY=<your_api_key>`) | |
4. Run it! `uv run python tiny_agent.py` | |
""" | |
import asyncio | |
from pydantic_ai import Agent |
This file contains hidden or 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
# Define the WSL mount command and its arguments | |
$wslCommand = "wsl.exe" | |
$wslArguments = "--mount \\.\PhysicalDrive2 --partition 1 --type ext4 --name data_wsl_shared" | |
# Create the scheduled task action that will run the WSL command | |
$action = New-ScheduledTaskAction -Execute $wslCommand -Argument $wslArguments | |
# Create a trigger that runs the task at system startup | |
$trigger = New-ScheduledTaskTrigger -AtStartup |
This file contains hidden or 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
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH | |
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="robbyrussell" | |
DISABLE_MAGIC_FUNCTIONS="true" | |
plugins=(git) | |
source $ZSH/oh-my-zsh.sh # First source oh-my-zsh | |
# Then set your custom prompt | |
PROMPT='%{$fg[cyan]%}%m%{$reset_color%} ${ret_status}%{$fg_bold[green]%}➜ %{$fg_bold[blue]%}%c%{$reset_color%} $(git_prompt_info)' |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
echo "Setting up Neovim with a modern configuration..." | |
# Detect the operating system | |
if [ -f /etc/os-release ]; then | |
. /etc/os-release | |
OS=$NAME |
This file contains hidden or 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 Load-RoutingTableFromJson { | |
param ( | |
[string]$JsonFilePath | |
) | |
if (-not (Test-Path $JsonFilePath)) { | |
Write-Error "JSON file not found: $JsonFilePath" | |
return $null | |
} |
This file contains hidden or 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
import json | |
import requests | |
import subprocess | |
import logging | |
import argparse | |
import csv | |
from datetime import datetime | |
import uuid | |
def configure_logging(debug): |
This file contains hidden or 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
#!/bin/bash | |
# ============================================================================= | |
# Install AzCopy on Linux | |
# https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10 | |
# https://github.com/Azure/azure-storage-azcopy | |
# ----------------------------------------------------------------------------- | |
# Developer.......: Andre Essing (https://www.andre-essing.de/) | |
# (https://github.com/aessing) | |
# (https://twitter.com/aessing) | |
# (https://www.linkedin.com/in/aessing/) |
This file contains hidden or 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
#!/bin/bash | |
set -x | |
patName="nameOfThePatToken" | |
adoOrgName="yourOrgName" | |
apiVersion="7.1-preview.1" | |
apiUri="https://vssps.dev.azure.com/$adoOrgName/_apis/tokens/pats?api-version=$apiVersion" | |
validTo=$(date -d '+90 days' +'%Y-%m-%dT%H:%M:%S.%3NZ') |
This file contains hidden or 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
This is sample public gist |
This file contains hidden or 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 Invoke-DatabricksAdminCreation { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, HelpMessage = 'Databricks instance URL')] | |
[string]$databricksUrl, | |
[Parameter(Mandatory = $true, HelpMessage = 'Databricks JWT token')] | |
[string]$bearerToken, | |
[Parameter(Mandatory = $true, HelpMessage = 'Object ID for the user')] |
NewerOlder