Skip to content

Instantly share code, notes, and snippets.

@grahama1970
grahama1970 / get_env_value.sh
Last active January 22, 2025 01:10
Efficient .env Key Retrieval for Raycast A Raycast Script Command to search and copy environment variable values from a .env file. Supports exact matching, abbreviation shortcuts, and fuzzy search with fzf. Outputs the value to the terminal and clipboard for seamless workflows.
#!/bin/bash
# Description:
# A Raycast script for quickly finding environment variables in .env files.
# Matches keys in three ways:
# 1. Abbreviations: "aak" → "AWS_ACCESS_KEY", "gpt" → "GITHUB_PAT_TOKEN"
# 2. Partial matches: "shap" → "SHAPE", "aws" → "AWS_KEY"
# 3. Fuzzy finding: "ath" → "AUTH_TOKEN"
# Matched values are copied to clipboard and printed to terminal using pbcopy (brew install pbcopy or similar)
@hyperupcall
hyperupcall / settings.jsonc
Last active January 8, 2025 13:29
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@74th
74th / toggle-terminal.py
Created May 16, 2021 02:42 — forked from zidizei/toggle-terminal.sh
Toggle your GNOME Terminal window with a keyboard shortcut under Linux.
#!/bin/python
import time
import subprocess
TERMINAL_APP = "gnome-terminal"
def run(command: list[str]) -> list[str]:
return subprocess.run(command, capture_output=True, encoding="ascii").stdout.strip().splitlines()
def toggle_terminal():
@ityonemo
ityonemo / test.md
Last active May 10, 2025 18:28
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

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)

@zidizei
zidizei / toggle-terminal.sh
Created May 23, 2019 20:58
Toggle your GNOME Terminal window with a keyboard shortcut under Linux.
#!/bin/bash
function toggle_terminal () {
Terminal_Window_ID=`xdotool search --all --onlyvisible --classname gnome-terminal`
# echo $Terminal_Window_ID
if [[ -z "$Terminal_Window_ID" ]]
then