Skip to content

Instantly share code, notes, and snippets.

View meowgorithm's full-sized avatar
💭
Gosh

Christian Rocha meowgorithm

💭
Gosh
View GitHub Profile
@simenbrekken
simenbrekken / KeyboardShortcutsMixin.js
Created August 31, 2014 08:15
React Keyboard Shortcuts Mixin
'use strict';
var KEYS = {
enter: 13,
left: 37,
right: 39,
escape: 27,
backspace: 8,
comma: 188,
shift: 16,
@davedelong
davedelong / DarkMode.applescript
Last active August 11, 2025 19:48
Toggle Dark Mode
on setDarkMode(shouldBeDark)
set paneID to "com.apple.preference.general"
tell application "System Events"
if dark mode of appearance preferences is shouldBeDark then return
end tell
set paneWasOpen to false
@bashbunni
bashbunni / .zshrc
Created January 4, 2023 16:28
CLI Pomodoro for Linux
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1
@qapquiz
qapquiz / ask.sh
Created April 1, 2023 12:06
ask.sh (ask ChatGPT in command line)
#!/bin/bash
function ask_gpt() {
PROMPT=$(gum input --width 80 --placeholder "prompt")
if [[ -z "$PROMPT" ]]; then
exit 0
fi
gum style --foreground 212 "> $PROMPT"
@bashbunni
bashbunni / commits-since-last-version.sh
Created October 17, 2024 18:40
Helper script to view number of commits since last release
#!/usr/bin/env sh
# This is a helper script to decide when you might need a new release.
# Prints the number of commits between origin/main or origin/master and the latest release for the selected repos.
# provide a directory path that includes your repos
if [ -z $1 ]; then
echo "Please provide a path to a directory housing your repos"
exit 1
fi