Turbocad activation can be done at the following URL:
http://activate.imsidesign.com
Friday, 11 January 2019
Thursday, 3 January 2019
Multiple partitions shown on FreeBSD when disk is formatted NTFS in Windows
A new 4TB USB disk was prepared for FreeBSD and formatted as NTFS using Windows 10.
The previous disk when connected was shown as /dev/da1s1
However the new device had to be mounted as /dev/da1p2
Trying to mount with
ntfs-3g /dev/da1p2s1 /mnt/usb
threw the error
The device '/dev/da1p2s1' doesn't seem to have a valid NTFS.
Why the difference?
Looking at gpart show /dev/da1 it indicates
=> 34 7814037100 da1 GPT (3.6T)
34 262144 1 !e3c9e316-0b5c-4db8-817d-f92df00215ae (128M)
262178 2014 - free - (1.0M)
264192 7813771264 2 !ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 (3.6T)
7814035456 1678 - free - (839K)
Note if you want to exclude directories, they are relative to the source folder, and the presence or absence of slashes is important.
The previous disk when connected was shown as /dev/da1s1
However the new device had to be mounted as /dev/da1p2
Trying to mount with
ntfs-3g /dev/da1p2s1 /mnt/usb
threw the error
The device '/dev/da1p2s1' doesn't seem to have a valid NTFS.
Why the difference?
Looking at gpart show /dev/da1 it indicates
=> 34 7814037100 da1 GPT (3.6T)
34 262144 1 !e3c9e316-0b5c-4db8-817d-f92df00215ae (128M)
262178 2014 - free - (1.0M)
264192 7813771264 2 !ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 (3.6T)
7814035456 1678 - free - (839K)
The first partition is a 128M Microsoft Reserved Partition.
The usable data exists in partition 2.
To mount the drive for copying data use:
mkdir /mnt/usb
kldload fuse
ntfs-3g /dev/da1p2 /mnt/usb
rsync -av --ignore-errors --exclude .recycle /mnt/Data /mnt/usb
kldload fuse
ntfs-3g /dev/da1p2 /mnt/usb
rsync -av --ignore-errors --exclude .recycle /mnt/Data /mnt/usb
Note if you want to exclude directories, they are relative to the source folder, and the presence or absence of slashes is important.
rsync -av --ignore-errors --exclude 'Andrew/Bulgaria' /mnt/Data /mnt/usb
Monday, 31 December 2018
Count files in a directory on a basic Linux system
find . -maxdepth 1 -type d -print0 | xargs -0 -I {} sh -c 'echo -e $(find {} | wc -l) {}' | sort -n
Thursday, 27 December 2018
Using an Azure Function, Puppeteer and a headless Chrome to drive a Web site like Selenium
These are some notes to describe how you can use Azure Functions and a headless Chrome to parse a Web site similar to using Selenium. It allows you to periodically pull some data from a Website without needing a Virtual Machine or a Cloud Service.
Install nvm-windows
Install the correct version of node (at the time of writing 10.6.0 was compatible with Azure Functions).
nvm install 10.6.0
node use 10.6.0
There was a bug meaning that some packages were missing and the error message "npm-cli.js not found" was displayed when running npm. The solution was to uninstall and reinstall again.
nvm uninstall 10.6.0
nvm install 10.6.0
Install Visual Studio Code.
Install the Azure Functions extension for Visual Studio Code.
Create a folder for the Azure Function.
CD to the folder.
Initialise NPM, otherwise you will get this error.
npm init
npm i puppeteer
Using the Azure icon in Visual Studio Code, login to the Azure Subscription.
Create the function using the Azure Functions integration in Visual Studio Code.
Test the function.
Deploy the function.
Once the function has been deployed, open a Kudu console and navigate to the D:\home\site\wwwroot\[FunctionName].
install Puppeteer by typing 'npm i puppeteer'
However it doesn't work properly as Chromium won't launch because of Azure App Function limitations.
Another option is browserless.io, but this is a paid resource.
Install nvm-windows
Install the correct version of node (at the time of writing 10.6.0 was compatible with Azure Functions).
nvm install 10.6.0
node use 10.6.0
There was a bug meaning that some packages were missing and the error message "npm-cli.js not found" was displayed when running npm. The solution was to uninstall and reinstall again.
nvm uninstall 10.6.0
nvm install 10.6.0
Install Visual Studio Code.
Install the Azure Functions extension for Visual Studio Code.
Create a folder for the Azure Function.
CD to the folder.
Initialise NPM, otherwise you will get this error.
npm init
npm i puppeteer
Using the Azure icon in Visual Studio Code, login to the Azure Subscription.
Create the function using the Azure Functions integration in Visual Studio Code.
Test the function.
Deploy the function.
Once the function has been deployed, open a Kudu console and navigate to the D:\home\site\wwwroot\[FunctionName].
install Puppeteer by typing 'npm i puppeteer'
However it doesn't work properly as Chromium won't launch because of Azure App Function limitations.
Another option is browserless.io, but this is a paid resource.
Addendum
This project uses an Azure Function to pull data from a website.
Sunday, 11 November 2018
Opening an existing instance of Visual Studio Code
By default, VS Code will open a new Editor with the desired file. If you'd like to instead reveal the already open Editor, set workbench.editor.revealIfOpen to true in your User Settings.
To be concrete, that means adding the following line:
"workbench.editor.revealIfOpen": true,
https://stackoverflow.com/a/43135102/2970867
Friday, 9 November 2018
Excel columns are truncated in confluence
To stop confluence truncating Excel columns:
Edit the spreadsheet in Excel
Page Layout > Width > Change from Automatic to 1 Page
https://confluence.atlassian.com/confkb/how-do-i-ensure-excel-file-with-wide-columns-does-not-get-truncated-in-confluence-file-previews-829068467.html
Edit the spreadsheet in Excel
Page Layout > Width > Change from Automatic to 1 Page
https://confluence.atlassian.com/confkb/how-do-i-ensure-excel-file-with-wide-columns-does-not-get-truncated-in-confluence-file-previews-829068467.html
EE Voicemail commands
return #
Listen again 1
2 save for later
delete 3
receive a text of the caller's number 4
reply or forward 5
6 pause
7 rewind 10 secs
8 next
9 forward 10 secs
Listen again 1
2 save for later
delete 3
receive a text of the caller's number 4
reply or forward 5
6 pause
7 rewind 10 secs
8 next
9 forward 10 secs
Subscribe to:
Posts (Atom)