Skip to content

Instantly share code, notes, and snippets.

@phantompunk
phantompunk / rag_a.py
Last active February 14, 2024 20:03
Snippets related to my 'Tapping into GenAI' IPPON blog post
import os
from dotenv import load_dotenv
from langchain_community.utilities import SQLDatabase
load_dotenv()
def get_snowflake_uri() -> str:
env = os.environ.copy()
return "snowflake://{}:{}@{}/{}/{}?warehouse={}&role={}".format(
env["USERNAME"],
@phantompunk
phantompunk / weekly-template.md
Created July 25, 2021 17:35
Weekly-Template

🗓 Week {{ .Week }} of [[Tasks {{ .Year }}|{{ .Year }}]] 💻

Previous Week - Next Week

{{ .Mon }} Mon

✏️ Tasks

  • [ ]

🗒 Notes

function fish_prompt --description 'Write out the prompt'
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color magenta)
end
if not set -q __fish_prompt_cwd
set -g __fish_prompt_cwd (set_color blue)
end
if not set -q __fish_cursor_cwd
@phantompunk
phantompunk / .gitignore_global
Last active January 23, 2019 17:08
One Global Ignore File for Work/Personal Projects
# Added to $HOME root directory
# curl -o .gitignore_global https://gist.githubusercontent.com/phantompunk/32c8278dab0098e061ddcf2ce1410bbe/raw/.gitignore_global
### PSD ###
Vagrantfile
.vagrant/
site/overlays
### IDE ###
.DS_Store
@phantompunk
phantompunk / .gitconfig
Last active May 6, 2020 14:26
Share Global Git Config Between PCs
# Add to $HOME root directory
# curl -o .gitconfig https://gist.githubusercontent.com/phantompunk/78b9f9f6608cbc542cfcfccc512e7152/raw/.gitconfig
# Run once after downloading the config
# git config --global core.excludesfile ~/.gitignore_global
[alias]
co = checkout
cob = checkout -b
cm = commit -m
#Dev Tools
#Android Studio
#Atom
#Intellij
#Virtual Box
#Genymotion
#Git
#Cross Platform
#Spotify
# 1. Add the Spotify repository signing keys to be able to verify downloaded packages
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0DF731E45CE24F27EEEB1450EFDC8610341D9410
# 2. Add the Spotify repository
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
# 3. Update list of available packages
@phantompunk
phantompunk / elementaryOSQuickStart.sh
Last active December 29, 2017 03:02
Elementary OS App Quick-Start
# Update your system
sudo apt update -y
sudo apt upgrade -y
#Enable PPA repositories
sudo apt install software-properties-common
# Fish Shell
# 1. Install Fish
sudo apt install fish -y