Skip to content

Instantly share code, notes, and snippets.

💭
Working on https://github.com/dlangille/thin_to_thick

Dan Langille dlangille

💭
Working on https://github.com/dlangille/thin_to_thick
Block or report user

Report or block dlangille

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View new
[dan@slocum:~] $ zfs get all system/iocage/jails/fileserver/root
NAME PROPERTY VALUE SOURCE
system/iocage/jails/fileserver/root type filesystem -
system/iocage/jails/fileserver/root creation Thu Mar 14 2:04 2019 -
system/iocage/jails/fileserver/root used 208G -
system/iocage/jails/fileserver/root available 13.1T -
system/iocage/jails/fileserver/root referenced 208G -
system/iocage/jails/fileserver/root compressratio 1.04x -
system/iocage/jails/fileserver/root mounted yes -
system/iocage/jails/fileserver/root quota none default
View gist:9b8fa8e2c85d55cf9eaa3254ad89bbd6
[dan@r710-01:/usr/local/poudriere/ports/default/dvl/FreshPorts-Scripts] $ grep cache pkg-plist
libexec/freshports/cache-refresh.sh
@dir(www,freshports,755) %%FP_DATADIR%%/cache
@dir(www,freshports,775) %%FP_DATADIR%%/cache/daily
@dir(www,freshports,775) %%FP_DATADIR%%/cache/general
@dir(freshports,freshports,755) %%FP_DATADIR%%/cache/html
@dir(www,freshports,775) %%FP_DATADIR%%/cache/news
@dir(www,freshports,755) %%FP_DATADIR%%/cache/pages
@dir(www,freshports,755) %%FP_DATADIR%%/cache/ports
@dir(www,freshports,775) %%FP_DATADIR%%/cache/spooling
@dlangille
dlangille / the SQL
Last active Mar 18, 2019
PGCon 2019 list of talks
View the SQL
pentabarf_pgcon=# SELECT DISTINCT E.title, string_agg(S.name,', ') as name
FROM event E, view_event_person P, view_mail_all_speaker S
WHERE E.event_id = P.event_id
AND P.person_id = S.person_id
AND E.conference_id = 15
and E.event_state = 'accepted'
and P.event_role_name = 'Speaker' and P.event_role_state_name = 'confirmed'
group by E.title order by 1;
title | name
---------------------------------------------------------------------------------------------+-----------------------------------
@dlangille
dlangille / the SQL
Last active Mar 10, 2019
BSDCan 2019 list of talks
View the SQL
pentabarf_bsdcan=# SELECT DISTINCT E.title, string_agg(S.name,', ') as name
FROM event E, view_event_person P, view_mail_all_speaker S
WHERE E.event_id = P.event_id
AND P.person_id = S.person_id
AND E.conference_id = 15
and E.event_state = 'accepted'
and P.event_role_name = 'Speaker' and P.event_role_state_name = 'confirmed'
group by E.title order by 1;
title | name
----------------------------------------------------------------------------------------------------+--------------------------------------
View 1 - testport mentions
=>> Checking for extra files and directories
=>> Error: Files or directories modified:
%%FP_DATADIR%%/cache user (10001, 80) permissions (0755, 0775)
%%FP_DATADIR%%/cache/daily user (10001, 80) permissions (0755, 0775)
%%FP_DATADIR%%/cache/news permissions (0755, 0775)
@dlangille
dlangille / what's with the warning?
Created Mar 4, 2019
building vendor directory for LibreNMS 1.49
View what's with the warning?
[dan@empty:~/librenms] $ git status
HEAD detached at 1.49
nothing to commit, working tree clean
[dan@empty:~/librenms] $ ./scripts/composer_wrapper.php install --no-dev
> LibreNMS\ComposerHelper::preInstall
Loading composer repositories with package information
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Package operations: 76 installs, 0 updates, 0 removals
- Installing symfony/dotenv (v3.4.22): Loading from cache
View 1 - the problem
[dan@slocum:~] $ /usr/local/bin/sudo /usr/local/libexec/nagios/check_smartmon -d /dev/da5
Traceback (most recent call last):
File "/usr/local/libexec/nagios/check_smartmon", line 309, in <module>
(healthStatus, temperature) = parseOutput(healthStatusOutput, temperatureOutput, devtype)
File "/usr/local/libexec/nagios/check_smartmon", line 219, in parseOutput
vprint(3, "Health status: %s" % healthStatus)
UnboundLocalError: local variable 'healthStatus' referenced before assignment
@dlangille
dlangille / ansible-playbook foo.yml
Created Mar 1, 2019
Ansible 2.7.0 with warnings about hostnames
View ansible-playbook foo.yml
$ ansible-playbook foo.yml
[WARNING]: Unable to parse /usr/local/etc/ansible/hosts as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring: knew.int.unixathome.org
@dlangille
dlangille / 1 - original version
Last active Mar 1, 2019
Verifying host and jail
View 1 - original version
[dan@x8dtu:~] $ cat /usr/local/libexec/nagios-custom/check_py_iocage_host_vs_jails.sh
#!/bin/sh
exit
HOSTVERSION=`/usr/bin/file /bin/sh`
JAILS=`/usr/local/bin/iocage list -H | /usr/bin/cut -f 2 -w`
ERRORS=''
for jail in ${JAILS}
View gist:db642ea9840c24eaeaaef165acbc4cc4
2019-02-28.03:15:25 zfs destroy main_tank/iocage/jails/x8dtu-pg02.vpn.unixathome.org@snapshot-for-backup
2019-02-28.03:15:30 zfs destroy main_tank/iocage/jails/x8dtu-pg02.vpn.unixathome.org/root@snapshot-for-backup
Feb 28 23:26:31 x8dtu shutdown: reboot by dan:
Feb 28 23:26:31 x8dtu bacula-fd: Shutting down Bacula service: x8dtu-fd ...
Feb 28 23:27:09 x8dtu nrpe[1049]: Caught SIGTERM - shutting down...
Feb 28 23:27:09 x8dtu kernel: .
Feb 28 23:27:09 x8dtu nrpe[1049]: Daemon shutdown
You can’t perform that action at this time.