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
#!/usr/bin/env sh | |
GVIM="/Applications/MacVim.app/Contents/MacOS/Vim" | |
if [[ -z "$1" ]]; then | |
if pgrep -fl Vim > /dev/null 2>&1 ; then | |
# bring MacVim window to front | |
osascript -e 'tell application "MacVim"' -e "activate" -e "end tell" | |
else | |
# launch new instance |
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 sys | |
import qrcode # uv add "qrcode[pil]" | |
def main(input_file, output_file): | |
with open(input_file, "r") as file: | |
data = file.read() | |
img = qrcode.make(data) | |
img.save(output_file) | |
print(f"QR code saved to {output_file}") |
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
package main | |
import ( | |
"fmt" | |
) | |
// Queue represents a simple FIFO queue | |
type Queue struct { | |
items []int | |
size int |
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
#lang racket | |
;; piglatin.rkt | |
;; generate piglatin for a given string using rules from | |
;; http://www.snowcrest.net/donnelly/piglatin.html | |
(define (split-on-space str) | |
(string-split str " ")) | |
(define (is-vowel ch) |
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
#!/usr/bin/env bash | |
set -e | |
echo "Determining the latest version..." | |
LATEST_TAG=$(curl -sf 'https://api.github.com/repos/dylanaraps/neofetch/tags' | jq -r '.[0].name') | |
echo "Downloading neofetch..." | |
curl -sfL -o neofetch.tar.gz "https://github.com/dylanaraps/neofetch/archive/refs/tags/${LATEST_TAG}.tar.gz" | |
mkdir ./tmp | |
tar -C ./tmp -xf neofetch.tar.gz --strip-components=1 |
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
# ~/.bashrc for arch | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
alias ls='ls --color=auto' | |
alias ll='ls -l' | |
alias lh='ls -lrth' | |
alias me=micro | |
alias ppath="echo $PATH | tr ':' '\n'" |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 7 in line 1.
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,^Alice Adams^,32,^3200 Sierra Drive, Bayport NY 10976^,125000 | |
2,^Bob Bayliss^,23,^1900 Madison Ave, Apt 20, Bridgeport NY 10980^,83000 | |
3,^Cayla Cass^,28,^1900 Brooke St, Apt 23, Bridgeport NY 10880^,120000 | |
4,^Dan Drummond^,42,^102 Ellis St, Lynnford NY 10320^,205000 | |
5,^Elaine Emms^,34,^112 Spring St, Hamford NY 10200^,130000 | |
6,^Fifi Fenriss^,21,^^,90000 | |
7,^Gaile Gantrieg^,29,^1900 Brooke St, Apt 23, Fremont CA 94537^,124000 | |
8,^Harry Hall^,35,^^,85000 | |
9,^Ian Isher^,26,^304 Malibu^^West Cross St, Dublin CA 94568^,89000 |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define PATH_ENV_VAR "PATH" | |
#ifdef _WIN32 | |
#define PATH_SEPARATOR ";" | |
#else | |
#define PATH_SEPARATOR ":" |
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
# ~/.tmux.conf for tmux 1.8 (RHEL7) | |
set -sg escape-time 20 | |
set -g default-terminal 'screen-256color' | |
set -g mouse-select-window on | |
set -g mouse-resize-pane off | |
# Start numbering at 1 | |
set -g base-index 1 | |
setw -g pane-base-index 1 |
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
#!/usr/bin/env python3 | |
import subprocess | |
targets = { | |
"nodejs": "18", | |
"ruby": "3", | |
"delta": "latest", | |
"exa": "latest", | |
"jq": "latest", |
NewerOlder