Skip to content

Instantly share code, notes, and snippets.

View blakedietz's full-sized avatar
🚲

Blake Dietz blakedietz

🚲
View GitHub Profile
@blakedietz
blakedietz / config.fish
Last active March 25, 2025 19:52
Database snapshot
if test -d ~/.config/fish/functions/work/jump
set -p fish_function_path ~/.config/fish/functions/work/jump
function db-snapshot
/Users/blakedietz/.config/fish/functions/work/jump/snapshots.fish $argv
end
end
#!/usr/bin/env fish
# PostgreSQL Database Snapshot Management Script
# Commands:
# - snapshot [name] [--notes "description"]: Create database snapshots for all DBs with a matching prefix and archive them (uses date/time if no name provided)
# - restore: Use fzf to select an archive and restore snapshots from it
# - delete: Use fzf to select an archive to delete
# Configuration
set -g BACKUP_DIR /Users/blakedietz/projects/Jump-App/database-backups
function create_jump_worktree --description "Create a new Jump App git worktree from a PR or new branch"
set -l branch_opt (fish_opt --short=b --long=branch --required-val)
argparse $branch_opt -- $argv
or return 1
# Define base directories
set -l source_dir /Users/blakedietz/projects/Jump-App/Jump
set -l worktrees_dir /Users/blakedietz/projects/Jump-App/Jump-worktrees
# Determine if we're creating a new branch or selecting a PR
@blakedietz
blakedietz / index.md
Last active February 25, 2025 05:44
neovim bootstrap recommendations

neovim configurations

I would start with lazyvim. Start completely fresh, then port over configurations and plugins into the ~/.config/nvim folder

Dotfile management

To manage dotfiles I would recommend a tool called chezmoi. It's got a terrible name, but of all the different approaches I've used over the years, it's been the absolute best.

defmodule App do
@moduledoc """
App keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
"""
def example() do
@blakedietz
blakedietz / questions.md
Created November 6, 2023 17:58
Scifi book club: Melancholia questions

"Melancholia," directed by Lars von Trier, is a film rich with themes, visual symbolism, and emotional depth, all of which can be explored through critical analysis. Here are some questions you might ask yourself:

  1. Narrative Structure and Style:

    • How does the film's two-part structure affect your understanding and interpretation of the story?
    • In what ways does the film’s pace and editing contribute to its overall mood and themes?
  2. Themes:

    • What is the significance of the film's title, "Melancholia," in relation to its themes?
    • How does the film explore the concept of depression, and how is it personified through the character Justine?
  • What does the film suggest about human behavior and emotions in the face of impending disaster?
defmodule AppWeb.CoreComponents do
@moduledoc """
Provides core UI components.
The components in this module use Tailwind CSS, a utility-first CSS framework.
See the [Tailwind CSS documentation](https://tailwindcss.com) to learn how to
customize the generated components in this module.
Icons are provided by [heroicons](https://heroicons.com), using the
[heroicons_elixir](https://github.com/mveytsman/heroicons_elixir) project.
@blakedietz
blakedietz / tasks.json
Created September 26, 2022 19:15
VSCode Elixir and Phoenix tasks
{
"version": "2.0.0",
"tasks": [
{
"label": "Nuke and pave",
"type": "shell",
"command": "rm -rf ./.elixir-ls; rm -rf ./deps; rm -rf ./_build; mix local.rebar --force; mix local.hex --force; mix deps.clean; mix deps.get; mix deps.compile; mix ecto.reset; iex -S mix phx.server",
"options": {
"cwd": "${workspaceFolder}"
},
@blakedietz
blakedietz / notify.yml
Created June 10, 2020 20:57 — forked from trung/notify.yml
Notify slack about Github Actions workflow and its jobs status. `notify` job must be the last job in the workflow and it must depend on all other jobs
notify:
if: always()
name: Notify
needs:
- job1
- job2
- job11
- job3
- job4
runs-on: ubuntu-latest
The challenges here have varying levels of difficulty. This one is a 'Caesar Cypher' ROT12, which means each letter is rotated with the 12th letter to its right. For example: A = M. The next cypher will be harder. If you're curious about the old challenges (maybe you'll find hints?) check out #fun-sols-challenges
You can use the following sites to help solve these cyphers, but nothing beats using the ol noodle!
https://cryptii.com
https://dcode.fr
https://quipqiup.com
If you successfully solve the challenge of the day, DM sol with the solution, and most importantly, how you got it! I hope y'all have fun.