Skip to content

Instantly share code, notes, and snippets.

Avatar

Pedro A. López-Valencia palopezv

  • 2561 m.a.s.l. closer to the stars.
View GitHub Profile
@palopezv
palopezv / adiantum-encryption-how-to.md
Last active Jun 29, 2021
How to create a LUKS partition encrypted with Adiantum, ideal for low end and older devices/computers
View adiantum-encryption-how-to.md

How to create a LUKS partition encrypted with the Adiantum scheme

Important note

  • Sector size and key size are fixed, you cannot change them!
  • You can play with the hash but using less than sha256 is irresponsible!
  • You can convert an already existing luks2 partition with cryptsetup(8).

Very low end devices or computers (say, an old Pentium, Celeron, Raspberry Pi or older SoC)

@palopezv
palopezv / PKGBUILD_libtorrent-rasterbar
Created Sep 16, 2020
libtorrent-rasterbar PKGBUILD that fixes upstream ABI breakage
View PKGBUILD_libtorrent-rasterbar
pkgname=libtorrent-rasterbar
pkgver=1.2.10
pkgrel=1
epoch=1
pkgdesc="A C++ BitTorrent library that aims to be a good alternative to all the other implementations around"
url="https://www.rasterbar.com/products/libtorrent/"
arch=('x86_64')
license=('BSD')
depends=('boost-libs')
makedepends=('boost' 'python2' 'python')
@palopezv
palopezv / rclone_mount_commands.txt
Last active Mar 28, 2020
mounting cloud storage with rclone
View rclone_mount_commands.txt
# Unix-like OSs
#
# From the command line or a script, if using systemd
#
systemd-run --scope --user --nice=10 rclone mount --vfs-cache-mode full --vfs-cache-max-age <hours>h<minutes>m --write-back-cache --option big_writes remote: /home/<user>/<target>
#
# From a session manager or an OS using a diffent process manager...
#
rclone mount --vfs-cache-mode full --vfs-cache-max-age <hours>h<minutes>m --write-back-cache --option big_writes remote: /home/<user>/<target>
#
@palopezv
palopezv / user.js
Created Jun 2, 2019
Firefox Nightly Portable personal settings
View user.js
# Mozilla User Preferences
/* Do not edit this file.
*
* If you make changes to this file while the browser is running,
* the changes will be overwritten when the browser exits.
*
* To make a manual change to preferences, you can visit the URL about:config
* For more information, see http://www.mozilla.org/unix/customizing.html#prefs
*/
View svnserve configuration
# /etc/default/svnserve
# svnserve options
DAEMON_ARGS="--daemon --pid-file /run/svnserve/svnserve.pid --root /srv/svn/repos --log-file /var/log/svnserve/svnserve.log"
View URL to retreive a dump of a SVN repo in Google Code
The URI is:
https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/your-google-code-project/repo.svndump.gz
@palopezv
palopezv / enable_firefox_google_translate_support.js
Created Jan 25, 2019
Firefox can use Google Translate if you use your own private API keys
View enable_firefox_google_translate_support.js
/* https://bugzilla.mozilla.org/show_bug.cgi?id=1488232 */
browser.translation.ui.show = true
browser.translation.google.apiKey = "whatever"
@palopezv
palopezv / intel_gen4_gpu_linux_fix.md
Last active Mar 28, 2020
Intel Gen 4 mobile integrated GPU (GMA X3100 a.k.a. Crestline) Linux fix
View intel_gen4_gpu_linux_fix.md

Not needed with Linux 5.3 or later

To fix slow boot and spurious drm error with a gen 4 mobile integrated GPU (GL960, GLE960, GM965 and GME965) add the following to your kernel bootparams:

video.allow_duplicates=1 video=SVIDEO-1:d

The problem is the existence of a SVGA port, even if it is not wired out to a connector.

View ublock_kill_reddit_chat.txt
||redditstatic.com/_chat*.js$script,domain=reddit.com
||redditstatic.com/desktop2x/Chat*.js$script,domain=reddit.com
||reddit.com/chat/minimize$inline-script,domain=reddit.com
reddit.com###chat+.separator
reddit.com###chat
@palopezv
palopezv / getBlockLists.sh
Created Mar 25, 2018 — forked from johntyree/getBlockLists.sh
Make one large blocklist from the bluetack lists on iblocklist.com
View getBlockLists.sh
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'