Skip to content

Instantly share code, notes, and snippets.

View grahamperrin's full-sized avatar

Graham Perrin grahamperrin

View GitHub Profile
@grahamperrin
grahamperrin / freebsd-ports-git.md
Last active April 20, 2021 17:39
Beginning to use Git for FreeBSD ports: a rough guide

Beginning to use Git for FreeBSD ports: a rough guide

Not for committers.

Please treat this page as work in progress during the transition to Git.

Preparations

  1. rm /var/db/gitup/ports
  2. rm -r /usr/ports/*
@grahamperrin
grahamperrin / freebsd-env-misc.md
Last active June 9, 2024 14:03
FreeBSD environments miscellany

Miscellaneous notes on my FreeBSD environments

/etc/csh.cshrc

#
# System-wide .cshrc file for csh(1).

setenv PATH /usr/local/libexec/ccache:$PATH
setenv CCACHE_PATH /usr/bin:/usr/local/bin
@grahamperrin
grahamperrin / userChrome.css
Created March 9, 2021 06:41
Graham Perrin's userChrome.css for Firefox
/* https://old.reddit.com/r/firefox/comments/f942u2/profilespecific_problem_with_an_extension_button/ */
#TabsToolbar {
visibility: collapse;
}
*{ transition-duration: 50ms !important }
/* a close button on the left of each tab */
/* https://support.mozilla.org/questions/1157451#answer-961582 */
/* https://support.mozilla.org/questions/1157451#answer-961663 */
.tabbrowser-tab .tab-close-button {
@grahamperrin
grahamperrin / freebsd-from-source.md
Last active August 14, 2024 02:38
Updating FreeBSD -CURRENT from source, and more

Notes:

  • the routine is personalised – things such as SDDM and graphics/x11/nvidia-driver-470 in the mix, and the longhand helps me to not make mistakes after being distracted (or falling asleep at the keyboard, or whatever)
  • /bin/csh for all commands below, some no longer require root since I changed ownership of /usr/doc, /usr/obj, /usr/ports, and /usr/src.

Routine

  1. su -
  2. pkg lock -l
  3. pkg unlock emulators/virtualbox-ose-kmod graphics/drm-510-kmod graphics/drm-515-kmod
@grahamperrin
grahamperrin / freebsd-12-to-13.md
Last active September 17, 2023 19:33
Upgrade FreeBSD 12.⋯ to FreeBSD 13

Preamble

If you want future FreeBSD update and upgrade routines to be simpler: please support the PkgBase initiative. See, for example, https://alpha.pkgbase.live/.


Guidance below is for 12.⋯ systems that:

  • fall below 12.2-RELEASE-p4 (12.2 patch level 4)
  • boot from ZFS (not UFS).
@grahamperrin
grahamperrin / tab-hiding-extensions.md
Created February 28, 2021 18:32
Extensions for Firefox that can hide tabs

Not all extensions that offer to hide tabs use Mozilla's tabs.hide() API.

Simple Tab Groups

Does use the API.

When hidden tabs are restored, not all are loaded. This is good for performance.

When first added to a clean Firefox profile, the first move of a tab to a group is followed by the standard alert, from Firefox, that an extension has hidden a tab.

Visualising cross-site cookie protection in Firefox

Firefox 86.0

In privacy and security preferences for Firefox:

  • choose strict enhanced tracking protection.

Sign in to Reddit, then view (or review) security information – a single click on the padlock icon, in the address field – when visiting each of the pages below.

@grahamperrin
grahamperrin / mozilla-bug-1694699.md
Last active February 25, 2021 19:41
Mozilla bug 1694699: steps to reproduce, then end, an extensions conflict between Refined GitHub and Simple Tab Groups
--- media/mtransport/third_party/nICEr/src/stun/stun.h
+++ media/mtransport/third_party/nICEr/src/stun/stun.h
@@ -36,17 +36,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/param.h>
#include <sys/socket.h>
#ifndef LINUX
@grahamperrin
grahamperrin / HGST_HTS725050A7E630_TF0500Y906L81L_2019-08-15.txt
Created August 15, 2019 10:26
GSmartControl report with three raw values (two in parentheses) for Reallocated_Sector_Ct
smartctl 7.0 2018-12-30 r4883 [FreeBSD 13.0-CURRENT amd64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Hitachi/HGST Travelstar Z7K500
Device Model: HGST HTS725050A7E630
Serial Number: TF0500Y906L81L
LU WWN Device Id: 5 000cca 76cc2fec5
Firmware Version: GH2OA440
User Capacity: 500,107,862,016 bytes [500 GB]