IT notes

Enable Paste

To enable paste in chrome, open the console and enter: var allowPaste = function(e){ e.stopImmediatePropagation(); return true; }; document.addEventListener('paste', allowPaste, true);

kld_list

To load kernel modules after local disks are mounted add this to /etc/rc.conf: kld_list="fuse" in this case module fuse will be loaded

hw.(machine|model|ncpu)

To get an overview of the system: # sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu' hw.machine: amd64 hw.model: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz hw.ncpu: 16 hw.machine_arch: amd64

moosefs

Create a small distributed file system using 2 servers one acting as a mater/chunkserver and other only as a chunkserver. Install the required packages: pkg install moosefs3-cgi moosefs3-cgiserv moosefs3-chunkserver moosefs3-client For the master just add: pkg install moosefs3-master In all the servers add to your /etc/hosts and entry for the mfsmaster: X.X.X.X mfsmaster Before starting the master, crate the file /var/mfs/metadata.mfs with: MFSM NEW Create a pool to share:

MANIFEST No Such File or Directory

If when trying to install FreeBSD using bsdinstall you get: "Error while fetching file:///usr/freebsd-dist/MANIFEST" - no such file or directory Try to: [email protected]:~ # mkdir -p /usr/freebsd-dist/ [email protected]:~ # touch /usr/freebsd-dist/MANIFEST And then start again

ctrl-backslash

To send a quit signal to the process: ctrl-\ # (backslash) This will send a SIGQUIT

python site packages

To find the python site-packages paths: $ python -m site

DNS TCP

Unbound using DNS over TCP: server: private-domain: "plex.direct" forward-zone: name: "." forward-ssl-upstream: yes forward-addr: [email protected] forward-addr: [email protected] forward-addr: [email protected] forward-addr: [email protected] forward-addr: 2606:4700:4700::[email protected] forward-addr: 2606:4700:4700::[email protected] forward-addr: 2620:fe::[email protected]; forward-addr: 2620:fe::[email protected]; To test do: # unbound-control -c /var/unbound/unbound.conf lookup . It should return something like: The following name servers are used for lookup of . forwarding request: Delegation with 0 names, of which 0 can be examined to query further addresses.

ssh CanonicalDomains

SSH Canonicalization CanonicalDomains example.com example.net example.org # CanonicalizeFallbackLocal no CanonicalizeHostname yes Host *.example.com IdentityFile ~/.ssh/exampleCOM User foo Host *.example.net IdentityFile ~/.ssh/exampleNET User foo Host *.example.org User foo IdentityFile ~/.ssh/exampleORG more info: https://dotfiles.tnetconsulting.net/articles/2016/0109/ssh-canonicalization.html

pfsense

How to connect using serial (usb/com RJ45) port on macOS: $ sudo cu -s 115200 -l /dev/tty.usbserial-DN04FSAL To bail out when you’re done, type ~. as you would with SSH. Boot example: After installing (zfs on root): The toy: