Skip to main content

Posts

Showing posts with the label quicktip

How to watch Amazon Mini TV on browser

I know it is not possible to have a mobile phone in front of you all the time. Here, I am posting how you can watch Amazon MiniTV content directly on your Laptop/Desktop browser. When you open Amazon MiniTV ( url ) on the browser you would see something like this: Now, We will change the browser to a device (mobile) format by going into Inspect (here I am using Chrome). Right Click on the Browser and Select Inspect From Inspect window Click on Device type which looks something like this You will notice on the main browser page, that there is another bar appearing with dimensions for the device Choose a Mobile Device from the list like 'iPhone 12 Pro' and remember to refresh the page Now you can enjoy the mini tv content from Amazon on the browser

Check and Create a Node in XML, if it does not existing using PowerShell

Here is a quick code snippet to Add a Node in XML from from the XPath, the following PowerShell function will search for the node hierarchy, if it does not exist then it will create it. function   CheckForXMLNode  {      param  (          $File , # File Path of XML to search the node          $NodePath     )      $nodes  =  $NodePath  -split  "/"      $path  =  "//Configuration"      # My Sample Node Path is like this # //Configuration/Farm/CustomParent/CustomChild      foreach  ( $node   in   $nodes ) {          if  ( ( $node  -ne  "" ) -and ( $node  -ne  "Configuration" ) ) {   ...

Quick Trip: Rename Current branch in Git

I love to use Powershell and post-git module for day to day work with git. Sometimes, I have to rename my branches and I have this quick way to do to it. I love to write shortcuts in PowerShell's Profile to save time. Add this function in Powershell Profile.ps1: function RenameLocalBranch { param ( $ NewName ) $ currentBranch = git rev - parse -- abbrev - ref HEAD git branch - m $ NewName git push origin : $ currentBranch $ NewName git push origin - u $ NewName } save the profile.ps1 and open a new go to repo path call the function and give it a new branch name, it should update local and remote branch for you. here is the successful output: C:\Repos\proj [ name1 ≡ ] > RenameLocalBranch name2 Total 0 ( delta 0 ) , reused 0 ( delta 0 ) To https: // xxxxxxxxx.visualstudio.com / _git / xxxxxxxxxx - [ deleted ] name1 * [ new branch ] name2 -> name2 Everything up - to - date Branch ' name2 ...