Skip to content

Instantly share code, notes, and snippets.

View ovelny's full-sized avatar
Simple things.

ovelny

Simple things.
View GitHub Profile
@ovelny
ovelny / monaco-font-fix.md
Last active December 7, 2021 07:00
Fix pixelated Monaco Font (Google Chrome, Firefox...) on Linux

TL;DR: solution is to disable embedded bitmaps, either for all fonts or Monaco font

  • Create a file named 20-no-embedded.conf in ~/.config/fontconfig/conf.d/
  • To disable this behavior with all fonts, add this in your file:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font">
@ovelny
ovelny / timeshift-archlinux-fix.md
Last active September 26, 2024 01:39
Fix for scheduled backups with Timeshift and Arch Linux

Issue

If you installed Timeshift from the AUR package (https://aur.archlinux.org/packages/timeshift/), you'll find that scheduled backups may not work. This is due to cronie being disabled by default.

Fix

Check if cronie is present first:

systemctl list-unit-files | grep cronie
@ovelny
ovelny / cinnamon-hide-pamac-tray.md
Created May 29, 2018 10:03
Hide pamac-tray icon in Cinnamon

Run this and reboot to hide pamac-tray icon

bash -c '{
echo "[Desktop Entry]"
echo "Type=Application"
echo "Exec=pamac-tray"
echo "Hidden=true"
echo "Name[en_GB]=Pamac-Updater"
echo "Name=Pamac-Updater"
data:text/html,<html contenteditable="true" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"><head><style>[contenteditable="true"]{font-family:"Input Mono",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;font-size:16px;text-rendering:optimizelegibility;line-height:1.5;display:block;float:none;margin-left:auto;margin-right:auto;width:30%;margin-top:25px;text-align:justify;background-color:black;color:plum;font-weight:bold}</style></head><body></body></html>
@ovelny
ovelny / pip_upgrade_all.py
Last active August 13, 2019 19:54
Upgrade all --user installed pip packages and solve basic dependency conflicts. Use at your own risk.
#!/usr/bin/env python
from subprocess import call, check_call, check_output, PIPE, Popen
def main():
packages = check_output(
'pip freeze --user | awk \'{gsub("=.*","",$1);print}\'', shell=True, text=True
).split()
check_call(f"pip install --user --upgrade {' '.join(packages)}", shell=True)
@ovelny
ovelny / radio.sh
Created November 3, 2019 02:24
Simple script to play radio stations I like.
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# This script is meant to play some favorite radio stations
# in background easily, thanks to cvlc. The .pls URLs might
# become outdated with time, but hey... fingers crossed.
# All listed URLs are the best stream quality that I could find.
if [[ "$#" -eq 0 ]]; then

Keybase proof

I hereby claim:

  • I am ovelny on github.
  • I am ovelny (https://keybase.io/ovelny) on keybase.
  • I have a public key ASAamcMw6QPSgYqNmaDCGXxueJk0qpIamQtsUxTkGzadMwo

To claim this, I am signing this object:

@ovelny
ovelny / .vimrc-example
Created July 31, 2021 09:58
Script to make vimwiki + various plugins work like Joplin, with support for note encryption (https://ovelny.sh/blog/switching-from-joplin-to-vimwiki/)
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')
" Declare the list of plugins.
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
Plug 'ferrine/md-img-paste.vim', { 'for': 'markdown' }
Plug 'vimwiki/vimwiki'
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
" Optional: goyo
" Plug 'junegunn/goyo.vim'
@ovelny
ovelny / delete-likes-from-twitter.md
Created November 28, 2021 00:22 — forked from aymericbeaumet/delete-likes-from-twitter.md
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@ovelny
ovelny / block-all-likers.md
Created December 13, 2021 12:34
Block all likers of a tweet, semi-automatically.

Blocking all likers of a tweet

Sometimes you need to block a lot of bigots —promptly— and megablock doesn't always work. Here's a quick & dirty way to do it.

Preparing for the megablock

You'll need to create a developer app on Twitter. Follow the steps here: https://developer.twitter.com/en/apps

You'll also need python3 on your system, which should already be present if you use any flavor of Linux or macOS. If you're using Windows, you can follow the installation steps here: https://docs.python.org/3/using/windows.html