Skip to main content

Posts

Showing posts from 2022

Export-CSV Powershell, don't include pesky first line

You use Export-CSV to export a result to CSV in powershell,  It's a great tool, but it also includes type information in the first line.  For a GCI command, it typically creates something like;  #TYPE System.IO.DirectoryInfo This breaks a single click open when you want to view the file in something like Excel. You can tell Export-CSV to stop creating the Type Info by using the switch;      -NoTypeInformation So, your command ends up something like       gci -recurse | export-csv "20221124.csv" -NoTypeInformation

MB 360 User Guides

  How to use video  https://assets.sennheiser.com/global-downloads/file/12461/Video_13_-_Final_Version_1.mp4 Fact Sheet  1304_MB_360_UC_fact_Sheet_EN.pdf (sennheiser.com) Downloads Page Sennheiser Product Downloads then search for MB 360

Installing MSSQL server on Ubuntu

 A good guide at  https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver16 Key steps:  Import the public repository GPG keys: wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - Register the SQL Server Ubuntu repository: sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-preview.list)" Run the following commands to install SQL Server: sudo apt-get update sudo apt-get install -y mssql-server After the package installation finishes, run mssql-conf setup and follow the prompts to set the SA password and choose your edition.  sudo /opt/mssql/bin/mssql-conf setup Once the configuration is done, verify that the service is running: systemctl status mssql-server --no-pager For remote connection open the SQL Server TCP port (default 1433) on your firewall. At this point, SQL Server is running on your Ubuntu machine and is ready to use!

Using lets encrypt on HAProxy

  A good guide at  https://serversforhackers.com/c/letsencrypt-with-haproxy Some tricks were the   --preferred-challenges dns option  sudo certbot certonly --manual --preferred-challenges dns -d subdomain.somedomain.com also appending the full chain and private key files with tee

MacOS - Create Bootable USB from ISO

   Got this great guide from  https://www.lewan.com Tip:  Drag and Drop a file from Finder to Terminal to 'paste' the full path without typing and risking typos. Download the desired file Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight) Convert the .iso file to .img using the convert option of hdiutil: hdiutil convert -format UDRW -o /path/to/target.img /path/to/source.iso Note:  OS X tends to put the  .dmg  ending on the output file automatically. Rename the file by typing: mv /path/to/target.img.dmg /path/to/target.img Run  diskutil list  to get the current list of devices Insert your flash media Run  diskutil list  again and determine the device node assigned to your flash media (e.g. /dev/disk2) Run  diskutil unmountDisk /dev/diskN  (replace  N  with the disk number from the last command - in the previous example,  N would be  2 ) Execute  sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m  (replace  /path/to/downloaded.img  with the path