Skip to content

Instantly share code, notes, and snippets.

View ambiamber's full-sized avatar

NoOne IsHereAnymore ambiamber

View GitHub Profile
@ambiamber
ambiamber / mochabin-arch-linux-arm-via-ubuntu.txt
Last active October 31, 2023 22:55
Installing Arch Linux ARM on a Mochabin using Ubuntu 18.04
mochabin-arch-linux-arm-via-ubuntu.txt
Installing Arch Linux ARM on a Mochabin using Ubuntu 18.04
The first thing to do is to install a M.2 SATA SSD.
The M.2 socket on my Mochabin has this engraved on it:
H=4.2 B 2141D6 LOTES
H=4.2 and/or 4.2H is "height is 4.2 mm"
@ambiamber
ambiamber / Block Reddit
Created January 8, 2023 00:27
block-reddit.hosts
0.0.0.0 reddit.com i.reddit.com www.reddit.com m.reddit.com
0.0.0.0 a.thumbs.redditmedia.com
0.0.0.0 about.reddit.com
0.0.0.0 alb.reddit.com
0.0.0.0 amp-reddit-com.cdn.ampproject.org
0.0.0.0 b.thumbs.redditmedia.com
0.0.0.0 c.thumbs.redditmedia.com
0.0.0.0 d.thumbs.redditmedia.com
0.0.0.0 e.reddit.com
0.0.0.0 e.thumbs.redditmedia.com
@ambiamber
ambiamber / block-tictok.hosts
Last active January 15, 2023 03:03
Block TikTok
0.0.0.0 tiktok.com
0.0.0.0 www.tiktok.com
0.0.0.0 tiktok.net
0.0.0.0 v.tiktok.net
0.0.0.0 tiktokcdn.com
0.0.0.0 tiktokv.com
0.0.0.0 v.tiktok.com
0.0.0.0 musica.ly
0.0.0.0 muscdn.com
0.0.0.0 musemuse.cn
@ambiamber
ambiamber / partkeepr-on-ubuntu-22.04.1-jammy.txt
Last active July 16, 2023 17:10
Install Partkeepr 1.0.4 on Ubuntu 22.04.1 Jammy
There is no PHP 7.1 or 7.2 in Ubuntu 22.04 by default, so I use:
Ondřej Surý at https://deb.sury.org/
https://launchpad.net/~ondrej/+archive/ubuntu/php/
Install from ubuntu-22.04.1-live-server-amd64.iso
When you get a message "failed to unmount cdrom" just press the Enter key.
Select the minimal option.
Set time zone
sudo sudo dpkg-reconfigure tzdata
sudo -i
@ambiamber
ambiamber / partkeepr-php7.0-dependencies.txt
Last active September 16, 2022 20:51
partkeepr php7.0 dependencies
$ dpkg -l | grep php
ii libapache2-mod-php7.0 7.0.33-0+deb9u12 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php 1:7.0+49 all server-side, HTML-embedded scripting language (default)
ii php-apcu 5.1.8+4.0.11-1 amd64 APC User Cache for PHP
ii php-apcu-bc 1.0.3-2 amd64 APCu Backwards Compatibility Module
ii php-bcmath 1:7.0+49 all Bcmath module for PHP [default]
ii php-cli-prompt 1.0.2+dfsg-1 all tiny helper prompting for user input
ii php-common 1:49 all Common files for PHP packages
ii php-composer-ca-bundle 1.0.2-1 all utility library to find a path to the system CA bundle
ii php-composer-semve
@ambiamber
ambiamber / partkeepr-mysql-notes.txt
Last active September 15, 2022 19:46
Notes on exporting Partkeepr attachments.
Note that I only have one image attachment in my Partkeepr.
$ sudo mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 205
Server version: 10.1.48-MariaDB-0+deb9u2 Debian 9.13
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
@ambiamber
ambiamber / get-all-stackexchange-domains.sh
Last active August 14, 2022 15:01
List all stackexchange domains
#! /bin/bash
# 1. Fetch web page with the stackexchange domains.
# 2. Extract the lines that have links to the domains.
# 3. Discard a bit of irrelevant HTML that gets through the awk statement.
# 4. Extract the URI. https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
# 5. Remove the URI scheme. https://en.wikipedia.org/wiki/List_of_URI_schemes
curl -s https://stackexchange.com/sites?view=list \
| awk '/lv-item/{getline; print}' \