Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Cleanddit
// @namespace http://tampermonkey.net/
// @version 0.12
// @description Remove some annoying things
// @author deibit
// @license MIT
// @match https://*.reddit.com/*
// @icon https://reddit.com/favicon.ico
// @updateURL https://raw.githubusercontent.com/deibit/cleanddit/main/cleanddit.js
#!/usr/bin/env bash
set -e
target_osx=$(sw_vers -productVersion)
project_dir=/Users/rkmax/development/aseprite
skia_dir=/Users/rkmax/development/skia
arch="$(uname -m)"
bundle_trial_url=https://www.aseprite.org/downloads/trial/Aseprite-v1.2.40-trial-macOS.dmg
// Compiled by http://www.bobrosslipsum.com/ 2016 January
// from https://github.com/stevenpack/bob-ross-lipsum-rust
static PHRASES: [&str; 370] = [
"A beautiful little sunset.",
"A big strong tree needs big strong roots.",
"A fan brush is a fantastic piece of equipment. Use it. Make friends with it.",
"A happy cloud.",
"A little happy sunlight shining through there.",
"A thin paint will stick to a thick paint.",
"A tree cannot be straight if it has a crooked trunk.",
@deibit
deibit / tlds.js
Created June 5, 2020 21:32
tld javascript array
const tlds = [
"aaa",
"aarp",
"abarth",
"abb",
"abbott",
"abbvie",
"abc",
"able",
"abogado",
import os
import os.path
import rarfile
cwd = os.getcwd()
# Unrar all rar files
files = ['pdf','epub','azw3']
for rar in os.listdir(cwd):
export FZF_DEFAULT_OPTS='-m --no-mouse --height=50% --inline-info --reverse'
export FZF_DEFAULT_COMMAND='ag -p .gitignore --no-color --hidden -g ""'
@deibit
deibit / docker_cookbook.txt
Last active December 10, 2019 21:43
Docker cookbook
- Open an interactive session into a container
docker exec -it <containder_name> /bin/bash
(/bin/bash or whatever command you want to execute)
- Running a container in a specific network with a network alias (so we can reference this name in other containers):
docker run --name <container_name> --net <network_name> --net-alias <container_netname> -d <image>
@deibit
deibit / vim_compile.sh
Created May 8, 2019 09:39
Vim compilation in Linux
git clone https://github.com/vim/vim
cd vim
make distclean
./configure --with-features=huge \
--enable-cscope \
--enable-terminal \
--with-python3-command=/usr/bin/python3 \
--with-python3-config-dir=/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu \
--enable-fail-if-missing \
@deibit
deibit / visual_cryptography_py3.py
Created December 3, 2018 10:21
Visual Cryptography (Python3)
# Copyright, Robert Donovan, LessonStudio, 2014
# If you use this then tweet what you did with it @LessonStudio.
# This file takes one argument which is a file that you would like to split into two encrypted images.
# The original image can only be viewed by overlaying the two encrypted images.
# If printed on clear plastic, It can be very finicky to align the two images if the pixel count is too high.
# For best results keep the original image below 200x200 pixels and print as large as possible onto clear plastic to
# obtain the best results.
# You can go to higher resolutions but you then really have to be precise when aligning the two images.
@deibit
deibit / .tmux.conf
Last active October 25, 2023 11:50
tmux configuration
# Rebind prefix
set -g prefix C-Space
# Rebind copy-mode to a better Spanish keyboard setup
bind-key y copy-mode
set -g base-index 1
setw -g pane-base-index 1