Skip to main content

Posts

Showing posts with the label Programming

My Git cheat sheet

My Git cheat sheet Undo changes and remove untracked files c:\> git reset --hard HEAD c:\> git clean -fd Push local branch to remote c:\> git push -u origin feature/featurename Clone and checkout remote c:\> git clone --branch v1.3.9 --single-branch https://github.com/open62541/open62541.git To view the name of the head (detached like above) c:\> git show -s --pretty=%d HEAD

Enable re-sizing of Manjaro 18.1 VirtualBox VM

I have installed Manjaro 18.1 as a VM using VirtualBox. Tried to use the default configuration using Type = Linux, Version = Arch Linux (64-bit) as Manjaro was not availabe as an option when creating a VM in VirtualBox. Unfortunately, this sets the  Graphics Controller to VMSVGA which was too late for me to learn as this prevents resizing of the VM display. Anyway, to fix this, do the following. Update Manjaro for good measure $: sudo pacman -Syu If kernel is updated, restart the VM: $: sudo reboot Get the kernel in use as this will be needed later. $: uname -r Mine shows this 5.4.13-3-MANJARO Install VirtualBox guest utils $: sudo pacman -S virtualbox-guest-utils At a later point it will ask for VIRTUALBOX-GUEST-MODULES, this will be the kernel guest module that needs to be installed which should match with the running kernel. For example in my VM, console output shown below, I have to select 7 as I am running kernel 5.4 ( 5.4.13-3-MANJARO ). resolving

Firebase getting "Uncaught TypeError: Cannot read property 'GoogleAuthProvider' of undefined at script.js:xy

I was trying to follow the documentation on "Adding Firebase to your Google Cloud project" but for the life of me I can't get the authentication to work. Uncaught TypeError: Cannot read property 'GoogleAuthProvider' of undefined     at script.js:31 Opening Chrome's development console and inspecting firebase.auth will also show that it is undefined . Anyway, the fix is really easy but it was not apparent, at least for me, that I need to add the following in  index.html . <script src="https://www.gstatic.com/firebasejs/7.6.2/firebase-auth.js"></script> Enjoy!

Roku plugin for Eclipse does not work with Eclipse 2019-12(4.14)

Eclipse 2019-12 was released last December 18, 2019. Roku plugin for Eclipse is not working yet with the latest version. I will keep this post updated as I learn more. Note that Roku plugin for Eclipse works with Eclipse 2019-09(4.13), this was tested on Ubuntu 19.10. Reference: https://blog.roku.com/developer/roku-eclipse-plugin https://community.roku.com/t5/Roku-Developer-Program/Roku-plugin-for-Eclipse-not-working-using-version-2019-12/m-p/531443#M44770

Appium Windows Application Driver not working - looking for version 1.1

Installed Appium and Appium Windows Driver lately (12/18/2019) and observed that I can't get Windows application to be automated. It turns out that Appium v1.15.1 is hardcoded to check for Windows Application Driver version 1.1. To workaround, I made changes to %appdata%\npm\node_modules\appium\node_modules\appium-windows-driver\build\lib\installer.js, in two areas: Changed to  WAD_VER = '1.2' Changed to  WAD_EXE_MD5 = '50d694ebfaa622ef7e4061c1bf52efe6' See below for complete copy.

VS Code C# for Visual Studio Code (powered by OmniSharp) plugin not finding .NET Core SDK

Running VS Code with  C# for Visual Studio Code (powered by OmniSharp) plugin is complaining about the following: The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path. This happened on my environment when I have installed dotnet-sdk using snap. To workaround, do: $: sudo ln -sv /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet Reference: https://github.com/OmniSharp/omnisharp-vscode/issues/3077

Free math applications

List of free math applications: Maxima - computer algebra system ( link ) GNU Octave is a high-level language, primarily intended for numerical computations ( link ) Python + scipy + matplotlib + ipython + pylab - python based numerical package (link - various ) R - a language and environment for statistical computing and graphics ( link ) Sage ( link ) Scilab -  is an open source, cross-platform numerical computational package and a high-level, numerically oriented programming language( link )

UnrealEngine GenerateProjectFiles.bat error - could be due to missing RPCUtility.exe

Tried to run  GenerateProjectFiles.bat to build Unreal Engine from source ( link ),  but got error like below: C:\>Users\x\UnrealEngine>GenerateProjectFiles.bat Setting up Unreal Engine 4 project files... GenerateProjectFiles ERROR: It looks like you're missing some files that are required in order to generate projects.  Please check that you've downloaded and unpacked the engine source code, binaries, content and third-party dependencies before running this script. To fix, run setup.bat like: C:\Users\x\prj\UnrealEngine>setup.bat Note that you have to say no to the prompt Would you like to overwrite your changes (y/n)? .

How to view Console.WriteLine output in Xamarin Studio UI Test

To view Console.Write/Console.WriteLine output from within Xamarin Studio UI Test, do: If Unit Test pad/window is not visible, using App menu, do View | Pads | Unit Tests .  On a test that passed (e.g., ), select test and right click, then select Show results pad  ( )

Enable logging of .Net assembly binding via registry

You have a .Net application that fails to load and you are suspecting that it may have to do with assembly dependencies. On a development machine fuslogvw.exe will aid you in collecting failed assembly binding but fuslogvw.exe is not normally available on production environment. So what do you do? Logging of assembly binding can be enabled via the Registry, to do so navigate to HKLM\Software\Microsoft\Fusion . Add the following keys with corresponding values: Key Type Value ForceLog DWORD 1 LogFailures DWORD 1 LogResourceBinds DWORD 1 LogPath String C:\FusionLog\ You need to restart the .Net application under test for this to take effect. The log files will be saved in C:\FusionLog . Reference(s): http://stackoverflow.com/questions/1012252/using-fuslogvw-exe-on-a-machine-with-no-visual-studio-installed

Generating OPC Automation IDL, TLB and header files from OPCDAAuto.dll

OPC Automation IDL, TLB and header files are not easy to find. You can obtain this files from OPC Foundation if you are a member or maybe from OPC application vendor. The IDL file can be reverse engineered using OLE-Com Object Viewer. Once the IDL is generated TLB and other files can be generated from it as well. Below is a general direction how to do this. Steps to reverse generate IDL, TLB and header files for OPCDAAuto.dll: Download Windows 7 SDK. I am using GRMSDKX_EN_DVD.iso as the OS is Windows 7 64-bit. Install the SDK. Open CMD Shell (Start | All Programs | Microsoft Windows SDK v7.0 | CMD Shell) Change directory to bin folder. Run oleview.exe , this will open a 32-bit version of the application. Note that this is important as the OPCDAAuto.dll I have is 32-bit as well. Navigate to Type Libraries | OPC Automation 2.0 (Ver 1.0) Double click to view Type Library definition. Do File | Save As... to D:\OPCDaAuto\OPCDaAuto.IDL . Go back to the cmd.exe as per step