Advanced Issues

ESP8266 Programming with VS Code

Summary

ESP8266 modules are cheap and flexible microcontrollers. They can be purchased easily on AliExpress (https://www.aliexpress.com/item/1005006211265531.html) or elsewhere. They are one of many types of Arduino compatible microcontrollers.

VS Code is a Microsoft IDE that is common across the industry – https://code.visualstudio.com/

The below page focuses on the requirements to program the module in Linux.

Plug-in

To program an Arduino style unit with VS Code, you’ll need the Arduino extension (Marketplace Link: https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino). Once installed, it will prompt for the Arduino CLI, choose to use the “built in” CLI at this point.

Continue reading

Install and Manage Node.js with NVM

Installation Steps

Download and run the installation file:

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash

Exit the terminal session then reopen a terminal so that the environment changes take effect. Then run:

nvm -v

to ensure NVM is installed correctly.

Using NVM

Install the latest Node version with:

nvm install node

Install a specific version with:

nvm install 16

or for a more specific version:

nvm install 14.4.5

List the installed versions with:

nvm ls

Switch to an installed version with:

Continue reading

Sangoma S500 S505 Sip Phone Factory Reset

If you don’t have the password for a Sangoma S500 or S505 phone it can be reset back to factory defaults with the following steps:

  • Press the Menu button
  • Press the ***** button 3 times and then hold the X button for 10 seconds
  • The phone will now preform a factory reset

Once reset, the password for the Web interface or the Settings menu will be reset back to the default of admin or 222222 depending on the model.

Continue reading

Fundamental Coding Principles

Experience in coding is not necessarily about the intricacies of a language but is as much about concepts. Below is a list of concepts that should be applied regardless of the language.

DRY coding

Don’t Repeat Yourself is a fundamental principal. If there is a temptation to copy and paste a block of code think about how this block can be encapsulated and abstracted in a function or method.

Return quickly

Returning early will help performance and avoid the need for more conditional statements. Look for ways to return early, perhaps transforming:

Continue reading

Sync Password Over Vpn On Windows Ad Client

Method 1

Credit to:https://social.technet.microsoft.com/Forums/windows/en-US/f85e761f-8958-4024-b823-30d3df8a1384/active-directory-account-password-sync-over-vpn-possible-?forum=w7itpronetworking

If you have a Windows PC that is joined to an Active Directory but hasn’t been part of the network after a password change the PC may require an old password or you may not know the old password to log in. As you are connecting via a VPN

To force a sync on the client:

  • Login in with another account on the client PC or use an old password if it works
  • Connect via VPN
  • Open Command Prompt
  • Type runas /user:<DOMAIN>\<USERNAME> cmd
  • Enter the new password
  • Close both Command Prompts

This will force a sync with the Active Directory, allowing you to then log in with the new password. If running this process from another account you may be asked to log out and log back in the first time you use the new password as it syncs this new passwords across the local profile.

Continue reading

Cinebench R23 Results

Cinebench R23 results

CPU Multi Core Result Single Core Result
Phenom II X6 1020
Athlon II X4 640 3GHz 1380
Athlon A8-3870 APU 3GHz 1560
Core i5-3470 3.4GHz 2600
Core i5-6500 3.2GHz 3009 825
Core i5-6600 3.3GHz 3463 988
Xeon E3-1240 V2 3.4GHz 3180
Core i7-4770 3.4GHz 4270 873
Core i5-1135G7 2.4GHz 5235 1315
Ryzen 5600G APU 3.9GHz 10545 1445
Ryzen 5 5500 3.6GHz 10620 1347
Core i5-12400F 6C/12T 2.5GHz (DDR4 and with stock cooler) 12300 1682
AMD Ryzen 5 8600G (B650 chipset, DDR5) 13315 1785
Core i7-12700KF 12C/20T 3.6GHz (DDR4 with AIO liquid cooler) 22450 1868
Core I7-13700K 16C/24T 3.4GHz (B660 chipset, DDR4 with tower cooler) 26973 2095
Core i9-12900K (DDR4) 27200
Core I7-13700K 16C/24T 3.4GHz (Z670 chipset, DDR4 with AIO liquid cooler) 30565 2123

 

Continue reading

Dvorak Keyboard Tips

Use a Dvorak keyboard - ditch the old QWERTY keyboard

Anyone who has used a Dvorak keyboard will know the benefits of it, less finger movement and less risk of RSI, along with improved typing speeds. Once you’ve learnt the Dvorak layout it is also easy to switch back to QWERTY as well, so you not left alone in a world unfamiliar with you. A few tools can help learning and using the Dvorak keyboard easy.

Continue reading

Introduction To Php

This article isn’t an attempt to teach PHP coding but takes a step back, providing details on how to set up a PC to allow experimentation with the PHP language and giving tips on places to go to start learning the language itself.

Quick intro

PHP is a runtime language, sometimes called a scripting language. Like VBA (Visual Basic for Applications, the scripting language used in Microsoft Office) there is no need to compile an application. Taking Excel as an example, you write some VBA code, create an icon and link it to the code, click the button and then Excel interprets the VBA code as it runs it and completes the required actions. This means, however, that there needs to be a runtime environment. In the case of VBA, the Excel application is the runtime environment. You can’t use your VBA code without Excel.

Continue reading

Redirecting Urls With Htaccess

If you move the location of your website you should also provide a 301 redirect, letting search engines and end users know that the URL for your site has changed. This can also be useful to make sure all references are made without a www prefix, for example.

In Apache, with Mod Rewrite enabled, add the following three lines to a .htaccess file in the directory that used to contain the page. Note that in an FTP client you may have to enabled viewing hidden files to see .htaccess.

Continue reading

Vbscript Pinging Multiple Ip Addresses

A short while ago we needed to find the IP address of a new network device and were having trouble getting it running. The end result was we had to use brute force, and instead of sitting there typing to figure it out, wrote a small script and let it run. This script will only work on Windows XP or greater. The script pings IP within the intStartIP and intEndIP variables specificied and lets you know if an IP address returns results. Copy and paste the code below into a file called ping.vbs and set the first three variables as needed and then double click to run it.

Continue reading