Skip to content

Instantly share code, notes, and snippets.

@dllud
dllud / PKGBUILD
Created July 12, 2024 12:03
python-curl-cffi PKGBUILD
# Maintainer: Matthew Sexton <[email protected]>
# Contributor: Nebulosa <nebulosa2007-at-yandex-dot-ru>
# Contributor: dllud <dllud riseup net>
pkgname=python-curl-cffi
_name=curl_cffi
pkgver=0.5.10
pkgrel=2
pkgdesc="Python binding for curl-impersonate via CFFI"
arch=(x86_64)
@dllud
dllud / change-machine-id.md
Created July 15, 2022 19:29
How to change a cloned GNU/Linux machine's identity

How to change a cloned GNU/Linux machine's identity

You've just finished installing and configuring all those packages on your first machine. Now it's just a matter of cloning the hard drive into all the others and changing the hostname. Right?

Well, not so easy. If you wish to avoid conflicts on your network, backups and elsewhere, i.e. if you wanna end up with a unique fingerprint for each machine, you must go a few steps further.

Here follows a checklist to help you out. It's aimed at Debian and derivates (e.g. Ubuntu), though other distros won't be much different.

The old way: edit /etc/hostname and /etc/hosts

@dllud
dllud / screencast.md
Created December 9, 2019 00:32
Live screencast stream on GNU/Linux through CLI

Live screencast stream on GNU/Linux through CLI

Requirements

Software encoding

ffmpeg -f x11grab -s 1920x1080 -i :0.0 -r 5 -g 10 -vcodec vp9 -f matroska pipe:1 | ./server

@dllud
dllud / xmpp-servers-tor-onion-service.md
Last active November 14, 2024 23:09
Public XMPP servers with Tor Hidden Service

Public XMPP servers with Tor Onion Service

This is a tentative list of public XMPP (Jabber) servers that provide a Tor Onion Service (.onion address) for connections from within the Tor network. By public I mean, servers that are free for everyone to use and place no barriers on registration.

Clearnet domain Tor Hidden Service In-Band registration XEP compliance
5222.de fzdx522fvinbaqgwxdet45wryluchpplrkkzkry33um5tufkjd3wdaqd.onion links to web form 100%
cock.li xdkriz6cn2avvcr2vks5lvvtmfojz2ohjzj4fhyuka55mvljeso2ztqd.onion disabled 30%
dismail.de 4colmnerbjz3xtsjmqogehtpbt5upjzef57huilibbq3wfgpsylub7yd.onion disabled 100%
@dllud
dllud / full-dark-desktop.md
Last active September 9, 2024 11:12
Tips for a full dark desktop interface

Tips for a full dark desktop interface

GTK+ based desktop environments

On GNOME, Unity, Cinnamon, MATE, Xfce, LXDE and all other GTK+ based desktop environments choose a deep-dark theme such as Dorian. If you already run GTK+ 3.20 check out Cloak 3.20 or the darkest variant of Candra 3.20.

These are full-featured themes by killhellokitty that include modifications for Google Chrome (Chromium), Firefox and Thunderbird.

Web browsing

@dllud
dllud / gtk.css
Created July 14, 2016 12:10
Meld colours for dark themes
/*
* by Stefan Agner 2014
*/
/* Full line insert, left to right or visa-versa */
@define-color insert-bg #203020;
@define-color insert-outline #387038;
@define-color insert-text White;
/* Missing files in folder diff */
@define-color delete-bg #302020;
@dllud
dllud / backup-fde-cyanogenmod.md
Created March 4, 2016 00:51
How to backup an encrypted CyanogenMod Android

How to backup and restore an encrypted CyanogenMod Android

The easiest way to backup a CynogenMod (CM) based Android, such as Replicant, is to enter ClockworkMod Recovery (CWMR) and use the backup/restore feature. However that won't work in a device with Full Device Encryption (FDE) because the /data directory is encrypted and therefore unaccessible in CWMR.

Thus we'll have to use backup apps that work within CM, when /data is accessible. The following procedures can be used to backup and restore all your apps, data and settings, using only free software.

Backup

  1. Install oandbackup. Go to preferences > cryptography, enable encryption and set up your OpenPGP email. Back in preferences enable copy own apk and special backups.
  2. Use oandbackup to backup data+apk for all your user apps. Tip: use batch backup with sort and filter.
@dllud
dllud / debian-configure.md
Last active February 8, 2024 20:29
What to and how to configure Debian

Change keyboard layout

dpkg-reconfigure keyboard-configuration

Set locale

locale-gen dpkg-reconfigure locales vi /etc/default/locale

LANG="en_US.UTF-8"

LANGUAGE="en_US:en"

@dllud
dllud / bash-history-to-zsh-history.py
Last active April 13, 2021 19:54 — forked from op/bash-history-to-zsh-history.py
Import bash history (has no timestamps) to zsh history.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-history-to-zsh-history.py >> ~/.zsh_history
import sys
import time
def main():
@dllud
dllud / screencast-window-lossless
Last active August 29, 2015 14:16
Command to screen capture/cast a selectable X11 window using ffmpeg (avconv) with lossless H.264
gm=$(xwininfo | grep 'geometry') && avconv -video_size $(echo $gm | grep -Eo '[0-9]+x[0-9]+') -framerate 30 -f x11grab -i :0.0+$(echo $gm | grep -Eo '[0-9]+\+[0-9]+$' | sed s/+/,/),nomouse -c:v libx264 -qp 0 -preset ultrafast -profile:v high444 capture.mov