Skip to content

Instantly share code, notes, and snippets.

@onnyyonn
onnyyonn / blur.sh
Created September 7, 2024 18:00
Batch half-pixel blur
#!/bin/bash
export_dir="Export"
share_dir="Share"
mkdir -p "$share_dir"
overwrite=false
if [[ "$1" == "-overwrite" ]]; then
overwrite=true
fi
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p git bitwarden-cli jq
# This script downloads my SSH key from Bitwarden and then clones my private NixOS config repository from Github
# Assumptions:
# 1. You have only one item named "SSH Keys" stored in Bitwarden
# 2. The private key is saved in that item as an attachment named "id_rsa"
# 3. The public key is added to Github account
mkdir -p ~/.ssh

FZF Scripts

  • ksend: send files to other devices using kdeconnect
  • fz-open: navigate directory structure to find and open files
  • editdot: open dotfiles tracked by yadm in $EDITOR
  • dotlog: browse git log of dotfiles tracked by yadm, preview diff and copy commit hash
@onnyyonn
onnyyonn / awesome-wordle.md
Last active October 18, 2022 11:11
A non-exhaustive list of Wordle clones, variants and solvers
@onnyyonn
onnyyonn / wordfreqgen.py
Last active January 16, 2022 07:33
Sample script to generate freqencies of a list of words from Google Ngram Viewer
# Sample script to generate freqencies of a list of words from Google Ngram Viewer
import pandas as pd, numpy as np
import re, requests
from ast import literal_eval
# Import list of words
df = pd.read_csv("wordle_full.csv")
df.rename( columns={'Unnamed: 0':'word', 'Unnamed: 1':'frequency'}, inplace=True )
@onnyyonn
onnyyonn / wordle_full.csv
Last active January 14, 2022 01:37
List of Wordle-eligible words
aahed
aalii
aargh
aarti
abaca
abaci
aback
abacs
abaft
@onnyyonn
onnyyonn / quantile_bias_correction.py
Created December 29, 2021 07:40
Quantile Bias Correction with Empirical CDF
import numpy as np
from statsmodels.distributions.empirical_distribution import ECDF
def bias_correct(obs_data_train, model_data_train, model_data_test):
"""
Function for bias correcting model_data_test, based on obs_data_train and madel_data_train CDF.
All three should be numpy array. Can be multi-dimensional.
obs_data_train = observation / ground truth
@onnyyonn
onnyyonn / hoon1.hoon
Created April 22, 2020 06:44
Hoonschool assignments
|= i=@
`@ub`i
@onnyyonn
onnyyonn / firefox.md
Last active October 27, 2019 18:40
Firefox new tab dark background with no white splash
  • Go to about:config, change browser.display.background_color value to #000000 and toolkit.legacyUserProfileCustomizations.stylesheets value to true
  • Open profile folder in about:profiles under “Root Directory”
  • go to / create chrome subfolder, open / create userChrome.css and append the following lines: #browser vbox#appcontent tabbrowser, #content, #tabbrowser-tabpanels, browser[type=content-primary], browser[type=content] > html { background: var(--in-content-page-background)!important }
### Keybase proof
I hereby claim:
* I am onnyyonn on github.
* I am anamitra (https://keybase.io/anamitra) on keybase.
* I have a public key ASB16eMLCTYZzbmzoGU96qzJsxj6j7XSR9qJ-njEU3GnWwo
To claim this, I am signing this object: