Skip to content

Instantly share code, notes, and snippets.

@rosco-pc
rosco-pc / cbr2cbz.py
Created March 11, 2021 12:10
convert CBR to CBZ
#!/usr/bin/env python
import sys
import os
import shutil
import tempfile
import rarfile
import zipfile
@rosco-pc
rosco-pc / unifi.md
Last active November 1, 2024 12:26
Unifi commands.md

Unifi AP useful commands

using SSH:

  • log in to AP: $ ssh ubnt@<IP>
  • default username & password: ubnt & ubnt

Generic

Command Example Function
@rosco-pc
rosco-pc / x11_cursor.md
Last active September 22, 2024 07:16
X11 cursor on hdpi screens

Note: I'm now using XFCE scaling feature instead of the option below. Leave this up as I might go back to using wmx again

The default X cursor font exists both as a bitmap font (file cursor.pcf.gz) and as a Type 1 font (file cursor.pfa). The recipe provided below makes the bitmap font unavailable to the system and turns the font name cursor into an alias for the appropriately rescaled Type 1 font (via the fonts.alias file).

  • TODO: figure out how to make this permanent so sysupgrade will not overwrite the changes

  • rm /usr/X11R6/lib/X11/fonts/misc/cursor.pcf.gz to remove the bitmap font

  • mkfontdir /usr/X11R6/lib/X11/fonts/misc/ to remove the bitmap font from the font directory.

  • Create the file /usr/X11R6/lib/X11//Type1/fonts.alias with the following contents, adjusting 801 to the desired cursor size.

    echo "cursor -xfree86-cursor-medium-r-normal--0-801-0-0-p-0-adobe-fontspecific" > /usr/X11R6/lib/X11//Type1/fonts.alias

@rosco-pc
rosco-pc / xfce_menu_icon.md
Last active September 22, 2024 07:31
XFCE custom icon in menu

There does not seem to be a way to use a custom sized icon in the menu of XFCE. This is what I cobled together from different online resources:

  • Install and enable whisker menu
  • Create a transparent image (see comment for a example file)
  • Choose this transparent image as the icon for whisker menu and select to show icon only
  • create a gtk.css under ~/.config/gtk-3.0/ with the following contents (change size as wanted):
#whiskermenu-button {   
  background: @launcher_bg url("/path/to/icon") center;
  background-repeat: no-repeat;
 background-size: 64px 64px;