Skip to content

Instantly share code, notes, and snippets.

@GermainZ
GermainZ / weechat-hints.py
Last active August 7, 2020 15:26
Kitty URL kitten for URLs in WeeChat that tries to take into account line wraps (without having to enter raw mode)
# See https://github.com/GermainZ/kitty-weechat-hints
diff --git a/README.md b/README.md
index cce0d81..7a9e5bb 100644
--- a/README.md
+++ b/README.md
@@ -72,9 +72,11 @@ default, and can be shown to display line numbers next to the chat window
(Depending on your configuration, you may need to adjust some of its settings
for it to be displayed correctly, but the defaults should suit most users.)
-It is useful for `:<num>` commands, which will start WeeChat's cursor mode and
+It is useful for `:{num}` commands, which will start WeeChat's cursor mode and
@GermainZ
GermainZ / recolor.sh
Last active October 17, 2017 21:55
Shell script to recolor a wallpaper using for a specific colorscheme (e.g. can be used to recolor wallpapers to go with certain terminal colorschemes). Works best for minimalist wallpapers.
#!/usr/bin/zsh
# Shell script to recolor a wallpaper using for a specific colorscheme (e.g.
# can be used to recolor wallpapers to go with certain terminal colorschemes).
# Works best for minimalistic wallpapers.
#
# Usage: `./recolor.sh path_to_wallpaper`
# Recolored wallpaper will be saved as `path_to_wallpaper.recolored`.
# The colors to use (in hexadecimal format). Modify to your liking.
declare -a hexes=("1d2021", "ebdbb2", "282828", "928374", "cc241d", "fb4934", \
@GermainZ
GermainZ / steam_search.py
Created October 31, 2015 17:00
Print info of matched game for Steam searches in input (".steam <query>").
'''Print info of matched game for Steam searches in input (".steam <query>").
Dependencies
============
- `python-requests <http://python-requests.org>`_
Usage:
======
@GermainZ
GermainZ / steam.py
Created October 14, 2015 14:54
Print game info for any Steam URLs in input.
'''Print game info for any Steam URLs in input.
Dependencies
============
- `python-requests <http://python-requests.org>`_
Usage:
======
@GermainZ
GermainZ / web2pdf.py
Created February 16, 2015 16:16
Extract main content from a web page and convert it to PDF.
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
USAGE
python2 web2pdf.py <URL>
DESCRIPTION
Extract main content from a web page and convert it to PDF.
@GermainZ
GermainZ / clbin
Last active March 27, 2022 04:30
Upload text/images to clbin.com from the command line
#!/usr/bin/env bash
# Upload text/images to clbin.com from the command line
# License: ISC http://www.isc.org/downloads/software-support-policy/isc-license/
clip() {
if command -v xclip &> /dev/null; then
xclip -selection clip <<< "$@"
elif command -v xsel &> /dev/null; then
xsel -b -i <<< "$@"
fi
pkgname=devhost-git
pkgver=27.4ebe75f
pkgrel=1
pkgdesc="Upload and manage files on http://d-h.st (Dev-Host)"
arch=('any')
url="https://github.com/GermainZ/dev-host-cl.git"
license=('GPL3')
depends=('python' 'python-requests')
makedepends=('git')
provides=('devhost')
#!/usr/bin/env python2
import feedparser
import urllib
from dateutil import parser, tz, relativedelta
from datetime import datetime, tzinfo, timedelta
from HTMLParser import HTMLParser
from re import search
import logging
@GermainZ
GermainZ / arrays-french.xml
Created December 2, 2012 16:03
AFWall+ Translation files
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="modes">
<item>@string/whitelist_array_item</item>
<item>@string/blacklist_array_item</item>
</string-array>
<string-array name="locations">
<item>Défaut</item>
<item>Profil1</item>
<item>Profil2</item>