This file contains 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
#!/usr/bin/env -S deno run --allow-net --allow-env --allow-run --allow-read --allow-write | |
import { copy, paste } from "https://deno.land/x/[email protected]/mod.ts"; | |
import { config } from "https://deno.land/x/[email protected]/mod.ts"; | |
// Load environment variables | |
config({ export: true }); | |
const DEFAULT_SYSTEM = "Translate any user input into English, in an informal and concise way."; | |
const DEFAULT_MODEL = "gpt-4o-mini"; |
This file contains 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/zsh | |
# | |
# Translate clipboard text using OpenAI's GPT-4 model. | |
# Requires OpenAI API key. | |
# Requires xclip (X11) or wl-clipboard (Wayland) to access clipboard. | |
# Requires jq, curl, sed. | |
default_system="Translate any user input into English, informal and concise." | |
get_content_from_clipboard() { |
This file contains 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/zsh | |
gpt() { | |
if [[ ! $+commands[curl] ]]; then | |
echo "Curl must be installed." | |
return 1 | |
fi | |
if [[ ! $+commands[jq] ]]; then | |
echo "Jq must be installed." | |
return 1 |
This file contains 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
#!/usr/bin/env bash | |
# | |
# rofi-vscode.sh - A script to open recent files, folders and workspaces in VS Code. | |
# requires: rofi, jq, sqlite3 | |
# | |
# Usage: | |
# rofi -modi "VSCode:rofi-vscode.sh" -show VSCode | |
# | |
vscdb_path="$HOME/.config/Code/User/globalStorage/state.vscdb" |
This file contains 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
/** | |
* rofi -dump-theme output. | |
* Rofi version: 1.7.5 | |
**/ | |
* { | |
text-color: var(fg0); | |
padding: 0; | |
fg2: rgba ( 222, 222, 222, 50 % ); | |
bg2: rgba ( 8, 96, 242, 90 % ); | |
fg1: White; |
This file contains 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
configuration { | |
/* modes: "window,drun,run,ssh";*/ | |
font: "Source Code Pro Semi-Bold 14"; | |
/* location: 0;*/ | |
/* yoffset: 0;*/ | |
/* xoffset: 0;*/ | |
/* fixed-num-lines: true;*/ | |
show-icons: true; | |
terminal: "kitty"; | |
/* ssh-client: "ssh";*/ |
This file contains 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 | |
output_dir="$HOME/Videos/Replays" | |
rate=30 | |
pipe_path="/tmp/record_control_pipe" | |
pid_file="/tmp/record_screen.pid" | |
daemon_pid_file="/tmp/record_screen_daemon.pid" | |
daemon_log_file="/tmp/record_screen_daemon.log" | |
record_extension="mp4" | |
timeout=60 |
This file contains 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
cat -n .zsh_history | sort -t ';' -uk2 | sort -nk1 | cut -f2- > .zhistory |
This file contains 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
#!/usr/bin/env bash | |
# | |
# Helper script to save a URL to Omnivore | |
# | |
set -e | |
if [ -f $HOME/.omnivore ]; then | |
source $HOME/.omnivore | |
fi |
This file contains 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
#!/usr/bin/env python | |
import subprocess | |
import sys | |
SCREEN_LAYOUT = { | |
'horizontal': { | |
'full-size': '0,0,{width},{height}', | |
'half-left': '0,0,{width}/2,{height}', | |
'half-right': '{width}/2,0,{width}/2,{height}', |
NewerOlder