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 / tlp
Created August 30, 2022 19:09 — forked from pauloromeira/tlp
My TLP config file (/etc/default/tlp) for ThinkPad
# ------------------------------------------------------------------------------
# tlp - Parameters for power saving
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
# dir: /etc/default/tlp
# Hint: some features are disabled by default, remove the leading # to enable
# them.
# Set to 0 to disable, 1 to enable TLP.
@ovelny
ovelny / google-filter-sites.js
Created January 25, 2022 22:09
Filter SEO spam websites in google searches
// ==UserScript==
// @name Google search filter
// @version 1.0.0
// @description Filter / blacklist sites in Google search
// @author ovelny
// @match *://www.google.com/search?*
// @run-at document-start
// ==/UserScript==
blacklist = [
@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

@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 / .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'

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 / 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
@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)
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 / 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"