Skip to content

Instantly share code, notes, and snippets.

View dlangille's full-sized avatar

Dan Langille dlangille

View GitHub Profile
@dlangille
dlangille / 1 install
Last active November 20, 2022 17:24
trouble installing joe via home brew
[air01 dan ~] % brew install joe 8:55:49
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/services).
==> New Formulae
bindgen ferium libretls pgsync python@3.11 vhs
btrfs-progs fred libunibreak pinocchio rnr waybackpy
cbindgen gebug license-eye pluto tart xcodes
cdsclient hotbuild llama pomsky textract xq
cloudprober huggingface-cli mariadb@10.8 postgresql@15 trezor-bridge
@dlangille
dlangille / 1 - build failure
Last active November 7, 2022 13:49
Hello, I'm getting a build failure on x11-toolkits/qt5-gui and I'm sure it is because of configuration options ... somewhere, but I'm having trouble tracking it down.
===========================================================================
=======================<phase: package >============================
===> Building package for qt5-gui-5.15.5p165
pkg-static: Unable to access file /wrkdirs/usr/ports/x11-toolkits/qt5-gui/work/stage/usr/local/include/qt5/QtLinuxAccessibilitySupport/5.15.5/QtLinuxAccessibilitySupport/private/application_p.h:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/x11-toolkits/qt5-gui/work/stage/usr/local/include/qt5/QtLinuxAccessibilitySupport/5.15.5/QtLinuxAccessibilitySupport/private/atspiadaptor_p.h:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/x11-toolkits/qt5-gui/work/stage/usr/local/include/qt5/QtLinuxAccessibilitySupport/5.15.5/QtLinuxAccessibilitySupport/private/bridge_p.h:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/x11-toolkits/qt5-gui/work/stage/usr/local/include/qt5/QtLinuxAccessibilitySupport/5.15.5/QtLinuxAccessibilitySupport/
The before trigger assumed a port could appear in only one catgory (imagine a directory on disk)
e.g. /usr/ports/category/port/
However, there are virtual categories which group together similar ports in a category which does not exist on disk.
The before trigger grabbed values into local varibles instead of inserting directly into the target table.
The new trigger does a INSERT INTO ... SELECT FROM
@dlangille
dlangille / grep
Created September 11, 2022 14:18
FreeBSD ports which use pkg-desc from another port
root@freshports:/usr/ports # grep --exclude distfiles/ -r pkg-descr * | grep DESCR
Mk/Uses/qt-dist.mk:DESCR?= ${PORTSDIR}/devel/${_QT_RELNAME}/pkg-descr
Mk/bsd.port.mk:DESCR?= ${PKGDIR}/pkg-descr
Mk/bsd.port.mk: @if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi
accessibility/linux-c7-atk/Makefile:DESCR= ${.CURDIR}/../${PORTNAME}/pkg-descr
accessibility/linux-c7-at-spi2-core/Makefile:DESCR= ${.CURDIR}/../${PORTNAME}/pkg-descr
accessibility/linux-c7-at-spi2-atk/Makefile:DESCR= ${.CURDIR}/../${PORTNAME}/pkg-descr
archivers/linux-c7-lz4/Makefile:DESCR= ${.CURDIR}/../liblz4/pkg-descr
audio/linux-c7-flac/Makefile:DESCR= ${.CURDIR}/../${PORTNAME}/pkg-descr
audio/linux-c7-pulseaudio-utils/Makefile:DESCR= ${.CURDIR}/../${PORTNAME}/pkg-descr
@dlangille
dlangille / git diff port.pm
Created September 10, 2022 16:23
FreshPorts - dev shows the port home page but stage does not
[dev-ingress01 dan ~/modules] % svn diff port.pm 16:23:03
Index: port.pm
===================================================================
--- port.pm (revision 5833)
+++ port.pm (working copy)
@@ -728,7 +728,8 @@
my $only_for_archs, my $not_for_archs, my $license, my $fetchdepends,
my $extractdepends, my $patchdepends, my $uses, my $pkgmessagepath,
my $distinfo_file, my $license_restricted, my $manual_package_build, my $license_perms,
- my $conflicts, my $conflicts_build, my $conflicts_install, my $options_name) = split(/\n/s, $MakeResults);
@dlangille
dlangille / 1 - creating the database
Last active August 29, 2022 00:04
Importing data from Greeneye Monitor (GEM)
$ mysql -u root -p
mysql> create user gemuser identified by 'gempass'
mysql> create database gem;
mysql> grant usage on gem.* to gemuser@localhost identified by 'gempass';
mysql> grant all privileges on gem.* to gemuser@localhost;
$ cat config.txt
mysql_out = true
mysql_host = localhost
@dlangille
dlangille / 1 - btmon sources
Last active August 29, 2022 23:05
btmon and GEM - I'm looking at options for displaying the data produced by GEM - https://www.brultech.com/greeneye/
btmon can:
Collect data from Brultech ECM-1240, ECM-1220, and GEM power monitors. Print
the data, save the data to database, or upload the data to a server.
Python 3 compatible fork: https://github.com/BenK22/mtools/tree/influxdb/bin
Which was forked from: https://github.com/mroch/mtools
Original repo: https://github.com/matthewwall/mtools
@dlangille
dlangille / install homeassistant
Created August 27, 2022 16:02
/srv/homeassistant/bin/pip install homeassistant
homeassistant@homeassistant:~ $ /srv/homeassistant/bin/pip install homeassistant
Collecting homeassistant
Downloading homeassistant-2022.8.7-py3-none-any.whl (18.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.5/18.5 MB 16.6 MB/s eta 0:00:00
Collecting python-slugify==4.0.1
Downloading python-slugify-4.0.1.tar.gz (11 kB)
Preparing metadata (setup.py) ... done
Collecting awesomeversion==22.6.0
Downloading awesomeversion-22.6.0-py3-none-any.whl (11 kB)
Collecting jinja2==3.1.2
@dlangille
dlangille / from my package build server
Created August 5, 2022 17:27
I keep forgetting about sysutils/duf on FreeBSD
[pkg01 dan ~] % sudo duf 17:26:16
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 26 local devices │
├────────────────────────────────────────┬────────┬────────┬────────┬───────────────────────────────┬──────┬───────────────────────────────────────┤
│ MOUNTED ON │ SIZE │ USED │ AVAIL │ USE% │ TYPE │ FILESYSTEM │
├────────────────────────────────────────┼────────┼────────┼────────┼───────────────────────────────┼──────┼───────────────────────────────────────┤
│ / │ 609.7G │ 10.2G │ 599.5G │ [....................] 1.
@dlangille
dlangille / git diff
Created May 10, 2022 13:25
net-snmp-5.9.1,1
$ git diff
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 0af9bccd05ee..9827504952b6 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -1,8 +1,7 @@
# Created by: gpalmer
PORTNAME= snmp
-PORTVERSION= 5.9