Skip to content

Instantly share code, notes, and snippets.

@imryche
imryche / lights-on.sh
Last active June 6, 2023 11:51
Force Chrome to use light color scheme on websites
#!/bin/bash
gsettings set org.gnome.desktop.interface color-scheme prefer-light
@imryche
imryche / alacritty-tmux-vim_truecolor.md
Created September 13, 2022 16:20 — forked from andersevenrud/alacritty-tmux-vim_truecolor.md
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@imryche
imryche / setup.sh
Created June 8, 2022 07:19
Setup dockerized Redash on Ubuntu 22.04
#!/bin/bash
# This script setups dockerized Redash on Ubuntu 22.04
set -eu
REDASH_BASE_PATH=/opt/redash
install_docker() {
sudo apt -y update
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
@imryche
imryche / README.md
Created December 19, 2020 13:51 — forked from hofmannsven/README.md
Increase key repeat rate on macOS

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.

Source: https://apple.stackexchange.com/a/83923

@imryche
imryche / deep_equal.js
Last active March 1, 2018 19:08
deep equal
var obj1 = {here: {is: "foo"}, object: 2};
var obj2 = {here: {is: [1, 2, 3]}, object: 2};
console.log(deepEqual({here: {is: "ana"}, object: 2}, {here: {is: "ana"}, object: 2})); // test
console.log(deepEqual(obj1, obj1)); // true
console.log(deepEqual(obj1, obj2)); // false
console.log(deepEqual(obj2, obj2)); // true
function deepEqual(obj1, obj2) {
for (var key in obj1) {
@imryche
imryche / work_bbot.scpt
Created November 8, 2017 10:46
iTerm2 AppleScript to start work environment
tell application "iTerm2"
create window with default profile
tell current session of current window
write text "cd ~/dev/rt/slack-hbd-bot"
write text "workon bbot"
end tell
tell current window
create tab with default profile
@imryche
imryche / overwatch.py
Created October 24, 2017 09:22
Celery worker autoreloader
#!/usr/bin/env python
"""
Usage example:
./overwatch.py [folder to watch] [patterns] [celery app]
./overwatch.py slack_hbd_bot '*.py' slack_hbd_bot.taskapp
"""
import sys
import time