Wednesday, March 20, 2024

Developer Setup on Windows

Windows

  1. Display settings.

Install 

  1. Google Chrome
    • Make default browser
    • Plugins:
      • AWS Extend Switch Roles
      • Bitwarden
      • Session Buddy
  2. Firefox + Edge + Brave
  3. NVidia GeForce Experience (use to download latest drivers)
  4. Git for Windows
  5. TortoiseGit
    • git config --global --add safe.directory 'c:/myfolder'
    • github will prompt to login via browser
  6. Visual Studio Code
  7. Node.js includes npm
  8. AWS CLI
  9. MySQL Workbench
  10. Notepad++
  11. Draw.io
  12. SnagIt
  13. Camtasia
  14. MS office + teams + skype
    •  Configure Outlook to open links in default browser.
  15. Open OneDrive and login to accounts to view files on local
  16. Adobe Acrobat Reader
NPM
  • npm install -g @ionic/cli
  • npm install -g @angular/cli
Visual Studio Code
  • Command Palette > Open User Settings JSON
    {
        "typescript.implementationsCodeLens.enabled": true,
        "[typescript]": {
            "editor.detectIndentation": false,
            "editor.tabSize": 4,
        },
        "[html]": {
            "editor.detectIndentation": false,
            "editor.tabSize": 4
        }
    }

Troubleshooting
  • speedtest.net (internet connection speed test)
  • 3DMark demo (for basic GPU/CPU benchmark)

Friday, March 8, 2024

SuperMicro Desktop Workstation Build 2024

Supermicro Full-Tower SuperWorkstation (SYS-551A-T)

CPU
1 x Intel® Xeon® W5-3435X Processor 16-Core 3.10 GHz 45MB Cache (270W) 

Memory
2 x 32GB DDR5 4800MHz ECC RDIMM Server Memory 

Storage
1 x 1.9TB 2.5" 7450 PRO NVMe (7mm) PCIe 4.0 Solid State Drive (1 x DWPD) 

Networking
1 x 1 x 10Gb E
 
GPU
1 x NVIDIA Quadro RTX A4000 16GB GDDR6 PCIe 4.0 x16 - 4 DisplayPort (140W) 

Accessory
1 x MCP-220-73102-0N - 3.5" to 2.5" Converter Drive Tray (Required Accessory)
1 x MiniSAS HD to U.3 with Power Cable (Required Accessory) 
1 x CBL-0082L - Y Split SATA Power Adapter (Required Accessory)
1 x CBL-SAST-0624 - SATA 70cm Cable (Required Accessory)
1 x DVM-TEAC-DVDRW24-HBT - Slim DVD-RW SATA Drive (Required Accessory)
1 x SKT-1333L-0000-FXC - E1A Carrier (Required Accessory)
1 x SNK-P0091AP4 - 4U Active CPU Heat Sink (Required Accessory)
1 x FAN-0222L4 - 120MM Fan (Required Accessory)

Operating System
1 x Windows 11 Professional 64-Bit

Display
2 x Acer Predator XB273K Pbmiphzx 27" UHD (3840 x 2160) IPS Monitor with NVIDIA G-SYNC

I/O Ports

Front:

    • two USB2.0 ports
    • two USB3.2 Gen1 (5 G) Type A ports
    • one USB3.2 Gen2 (10 G) Type C port
    • one Power Button
    • one Audio In, one Mic In

Button Rear:

    • one 10 Gb LAN port
    • one 1Gb LAN port
    • one USB3.2 Gen2 x2 (20 Gbps) Type C port
    • four USB3.2 Gen2 x1 ports
    • two USB2.0 ports
    • one VGA port (for BMC interface)
    • HD Audio 7.1 Channel connectors
    • one COM port

Onboard:

    • one USB3.2 Gen 2 Type C header
    • two USB3.2 Gen1 (5 G) headers
    • two USB2.0 headers
    • ten 4-pin fan headers
    • one 1 2V power header for water cooling pump
    • one DOM PW connector
    • one TPM 2.0 header

SuperWorkstation SYS-551A-T
SYS-551A-T Manual

Problem 1:
Displays message "checking media presence" and displays the BIOS page.
Support Wrote:
press F11 to the boot menu. It should have the "UEFI: Windows OS" option. Check the U.2 drive cable inside the chassis.  Make sure that the cable was connected properly on both U.2 connector and U.2 drive. 
Solution 1:
The cable was not plugged into the back of the system drive located in one of the drive bays. Simply plugging the cable in resolved this issue. The cabling bundle tie is too tight. It needs to be cut to give the cables more slack.

Problem 2:
Windows 11 is not activated.
Solution 2:
Bottom of chassis contains a Windows sticker. Lightly scratch the silver part to reveal the rest of the 25 character Windows activation code. Settings > Activation settings > Change product key (enter key from sticker).

Problem 3:
Windows 11 is so slow it's basically unusable. e.g. File explorer takes 10 secs to display completely.
Solution 3:
Set: Control Panel > Power Options > High Performance

Problem 4:
Windows 11, "system > display" shows 3 monitors. One of them is labelled "1" and is a phantom (i.e. this physical monitor doesn't exist). Clicking "disconnect this display" does not fix the problem.
Solution 4:
?

Tuesday, October 23, 2018

Ionic 4 + Capacitor + Firebase Messaging + iOS Proof of Concept

Problem:

How to get Firebase FCM device token from iOS device in an Ionic 4.beta and Capacitor 1.0.0-beta.8 project.

Solution:

Capacitor push notifications on an Android device returns an FCM device token. However, iOS devices return an APNS device token. Firebase is unable to send a message with an APNS token. However, the APNS token could be used to send a message via Apple's Push Notification Service.

To get an FCM on an iOS device, follow the instructions here for setting up a Firebase Cloud Message Client App on iOS: https://firebase.google.com/docs/cloud-messaging/ios/client

Proof of Concept (in short):

a. Add Firebase pods to /ios/App/Podfile


target 'App' do
  # Add your Pods here
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'

b. Run in the console in /ios/App: pod install

c. In /ios/App/App/AppDelegate.swift insert the following:

// part 1 of 3

import UserNotifications
import Firebase

// part 2 of 3

// Override point for customization after application launch.
    
    // Use Firebase library to configure APIs
    FirebaseApp.configure()
    
    Messaging.messaging().delegate = self
    
    if #available(iOS 10.0, *) {
        // For iOS 10 display notification (sent via APNS)
        UNUserNotificationCenter.current().delegate = self
        
        let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
        UNUserNotificationCenter.current().requestAuthorization(
            options: authOptions,
            completionHandler: {_, _ in })
    } else {
        let settings: UIUserNotificationSettings =
            UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
        application.registerUserNotificationSettings(settings)
    }
    
    application.registerForRemoteNotifications()

// part 3 of 3
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
        print("Firebase registration token: \(fcmToken)")
        
        let dataDict:[String: String] = ["token": fcmToken]
        NotificationCenter.default.post(name: Notification.Name("FCMToken"), object: nil, userInfo: dataDict)
        // TODO: If necessary send token to application server.
        // Note: This callback is fired at each app startup and whenever a new token is generated.
    }

Friday, October 12, 2018

Angular 6 Component Require JSON ExpressionChangedAfterItHasBeenCheckedError

Problem:

In an Angular 6 project, a simple component that gets json data from a local file generates error: ExpressionChangedAfterItHasBeenCheckedError

Solution:

Do not use the following method to import local json data into the component:
const data = require('./data.json');

Use other standard approaches e.g.

this.http.get(this.dataUrl).subscribe((data: any) => {
    // Do something with json data!
});

Saturday, August 11, 2018

Ionic 4 Debug With Chrome Sources

Problem
In Ionic 3, it was easy to find source .ts code in Chrome's developer tools "Sources" tab for debugging. In Ionic4, it's difficult to find.

Solution:
In Chrome developer tools "Sources" tab drill into:
webpack:// > . > src > app



Ionic 4 + Capacitor Calling Local API Blocked Mixed Content Error

Problem:
Ionic 4 + Capacitor app running locally on device. NodeJS + Express + MongoDB API running local on http (not https).

Can hit local API successfully when running Ionic in browser on API url localhost or IPv4 address (e.g. 192.168.15.8).

When running on device (connected via USB) get the following error on all API calls (in Chrome developer tools network tab): (blocked-mixed-content)

Solution:
Add: "allowMixedContent": true
To: \capacitor.config.json
https://github.com/ionic-team/capacitor/issues/630

Tuesday, April 24, 2018

Windows 10 Boot Failure Error Code 0xc000000e

Problem:
Windows tries to load but fails with blue screen.

Recovery
Your PC/Device needs to be repaired
The application or operating system couldn’t be loaded because a required file is missing or contains errors.
File: \Windows\system32\winload.exe
Error Code:0xc000000e



Solution:

I was unable to recover from this error! But Peter was able to -- highly recommended -- he knows his stuff: http://www.peterspcrepair.com/

Notes based on my limited understanding of the problem:

1.
This was one of the clearest articles I could find.
https://www.lifewire.com/how-to-rebuild-the-bcd-in-windows-2624508
However, my understanding is it's not a suitable fix for a UEFI SSD system drive.

2.
This was one of the clearest articles I could find suitable for UEFI.
https://www.easeus.com/partition-manager-software/fix-uefi-boot-in-windows-10-8-7.html#part5

My results from command prompt: list vol



What tripped me up is I kept thinking the UEFI volume was the same as the system drive. I could assign a letter and see the files on my system drive (i.e. my C:\ drive with windows). But this is the wrong drive to use for bcdboot. The UEFI is apparently always FAT32. I "think" I should have been using volume 5. Volume 7 seems to be from my Windows 10 recovery disk.

So I should have been running (from command prompt) this:
diskpart
sel disk 0
list vol
sel vol 5
assign letter=G: Note: G is a unique drive letter not already in use.

3.
Restoring from a recent restore point did NOT resolve the issue. But was done before the boot repair above.

4.
BIOS boot mode changed from "Dual" to "UEFI". Unclear if this was a necessary fix. My understanding is this was NOT necessary. PC had been working with zero issues for the past 3 months.