Skip to content

Instantly share code, notes, and snippets.

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

Dan Langille dlangille

View GitHub Profile
View gist:08a1ef69d3f1bf2472af7ae163a0580f
[dan@supernews:~] $ telnet avacs1.vrt.sourcefire.com 25
Trying 2620:28:c000:a2::209...
Connected to avacs1.vrt.sourcefire.com.
Escape character is '^]'.
220-mail.vrt.sourcefire.com ESMTP Postfix
220 mail.vrt.sourcefire.com ESMTP Postfix
^C^[[A^]
telnet> quit
Connection closed.
[dan@supernews:~] $ telnet -4 avacs1.vrt.sourcefire.com 25
View 405.pkg-base-audit
[dan@slocum:~] $ sudo /usr/local/etc/periodic/security/405.pkg-base-audit
Checking for security vulnerabilities in base (userland & kernel):
Host system:
Database fetched: Sun Mar 17 14:29:28 UTC 2019
0 problem(s) in the installed packages found.
0 problem(s) in the installed packages found.
jail: test_nginx01
vulnxml file up-to-date
@dlangille
dlangille / 1 - the filesystem
Last active Mar 21, 2019
FreshPorts working directory ZFS tunables
View 1 - the filesystem
The sync=disabled is more appropriate for the repo dataset mentioned below.
I usually have atime off on all ZFS datasets.
sudo zfs create -o sync=disabled -o atime=off -o recordsize=32K tank_fast/freshports
sudo zfs create tank_fast/freshports/dev
sudo zfs create tank_fast/freshports/test
sudo zfs create tank_fast/freshports/stage
What goes in there? The following outline what sits in /var/db/freshports of a given dev/test/stage environment.
View details
$ sudo ls -l /var/spool/postfix/defer/B/B251C2BDE /var/spool/postfix/corrupt/B251C2BDE
-rwx------ 1 postfix wheel 2140 Sep 22 2017 /var/spool/postfix/corrupt/B251C2BDE
-rw------- 1 postfix postfix 309 Sep 22 2017 /var/spool/postfix/defer/B/B251C2BDE
[dan@zuul:~] $ sudo rm /var/spool/postfix/defer/B/B251C2BDE /var/spool/postfix/corrupt/B251C2BDE
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
You can’t perform that action at this time.