Playing around with npm (Node Package Manager?) needs a little bit of configuration if you are behind an authenticated corpoate proxy. I found myself in this situation while playing with npm at work for the first time. While trying to install some module, npm has shown the following message hinting that proxy configuration is not set.
To resolve this issue, simply configure http/https proxy settings with npm config command
npm config set proxy http://Username:Pa55w0rd@proxyhostname
npm config set https-proxy http://Username:Pa55w0rd@proxyhostname
Being behind an authenticated proxy in a corporate environment increases the probability that you have a very strong password enforced by your IS department. If you have special chars in your password, enclose your Username:Password pair in double quotes as shown in the example below.
npm config set proxy http://"ninjadev:5trongP@ssw0rd"@proxy.some-bigcorp.com
npm config set https-proxy http://"ninjadev:5trongP@ssw0rd"@proxy.some-bigcorp.com
Finally if you wish to verify if the settings are active, verify it by issuing the command
npm config ls *proxy
Working in an IT field sometimes, opens your eyes towards a few smart things some brainy users find out. Recently I happened to find out a very interesting work around from a user in my organization. The HR department had asked all our employees to enroll in an HR related campaign and had circulated an application form, which was a PDF document.
All of us including the belittled us in the IT :), had printed out the application form and filled and submitted the handwritten forms to the HR Department. One smart user, had sent his application form in an email to the HR Dept. The person in charge contacted me and told me that they had received the only one application form that was typed and not hand written. This got me curious and I had contacted the user to know from him and how he had achieved this. Following are the steps:
1- Open any PDF Document, assuming the PDF Document to be an Application form.
2- Click on “Sign” on the top right hand side of the document. This should be on the top right end of the tool bar.
3- Upon clicking “Sign” you are presented with a few options
4- Click on Add Text and then click on that section of the document where you may have to fill in your personal details. A blinking cursor appears and you may just continue typing in all that you need.
5- The same can be done with “Checkmark” too. Just that a tick mark is the only option available.
I was so surprised at the ease at which the user explained this to me. The enlightenment I had on knowing something that none of us could think of, that moment. I bet you get that feeling only when you work in a support role. But again, where you are required to hand fill an application form, please do so ;).
PS: I’m assuming this to be working with only Windows 8.1 and Adobe Reader XI. I have a feeling that this will definitely work with Windows 8 and Windows 7 too but I feel Adobe Reader XI is a must. If any of you find this to be working with another version of Adobe Reader, please do let us know.
Android SDK Manager wont open
It’s always a pain in the <you-know-where> when you lose your hard disk to time. Some must be frowning at this statement asking ‘What’s the big deal in this cloud era?’. Well some or most of the data may be somewhere in the skies but getting everything back and setting up one’s development environment to whereever she was, is a real pain as what happened to me few weeks back when I lost my good old HP laptop.
So, I was setting up my Android developement environment on my new laptop with latest available ADT bundle and JDK. But when trying to launch the SDK Manager it was just failing to load and never left a trace of what went wrong. In my case the problem turned out that ADT was unable to locate the private JDK installation. To diagnose, the first thing you can do is to launch a command window, type
set JAVA_HOME there, press return key and see if it prints out any directory locations. If it doesn’t, Bingo, thats the deal.
Now, to fix this issue there are two ways, pick the one that suits your level of hackerdome.
- Option 1 : Set up your JAVA_HOME environment variable from Control Panel > System and launch SDK Manager (Refer to screenshot below)
- Option 2: Modify
<sdk-root>\tools\android.bat to point to the required JDK
/JRE location as shown below
(Here be dragons: Try this only if you have some clue to on how batch files work)
- Locate the line that says “set java_exe” , assign the path to java.exe, comment out the next two lines as shown below, save the file and then try launching SDK Manager
TL;DR: Android SDK Manager fails to start without showing any error messages and with possible one single blink of a black window? The ADT has no clue where to locate JDK/JRE on your PC. Either fix your PATH variable to point to a JDK/JRE location or edit
<sdk-root>\sdk\tools\android.bat file in the next line where you see the comment ‘Check we have a valid Java.exe in the path’
Applies to Installation of Windows 8 / 8.1 on Machines running Windows 7 or Vista Previously
- Boot using the Installation Disc
- Click Install but do not continue ahead.
- Press SHIFT-F10 to bring up the console
- Type “diskpart”
- Once within the diskpart prompt
- Type: list disk
- Type : select disk <number> (the number of the disk you wish to convert)
- Type: clean (to remove any existing configuration settings on the drive)
- Type convert to mbr
Apologies for the poor screenshots 🙂
Error Message when running Get-WmiObject cmdlet on a Remote Machine
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:1
+ Get-WmiObject win32_bios -ComputerName remotecomputername|Select PSComputerName,Manufact ...
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
Verify DCOM Settings on Remote Machine
- The first step is to check is if the DCOM Service is enabled in the Remote Machine
- From the remote machine; From the Start Menu; type dcomcnfg
- Open Computers – Right Click My Computer – Properties
- If the checkbox for ‘Enable Distributed COM on this computer ‘ is ticked; you have got through the first step. By default this option is always enabled
Check the Windows Firewall on Remote Machine
- The next step is to check Windows Firewall. It is most likely that your firewall is enabled.
- For testing purposes, please disable the Firewall on the remote machine and test the script. I’m sure you have got the result. If not, I would sadly request you to look for answers elsewhere 😦
- It is not advisable to disable your Firewall to get this working and most of all if you are administering a network of over 100 or 1000 machines this is not practical either. So the best way is to identify the Communication Port that was blocked when running the script. So turn back your Firewall On.
Enabling Logging on Windows Firewall and Identify Blocked Port on Remote Machine
- From Advanced Settings of your Firewall; right click Windows Firewall with Advanced Security on Local Computer and select Properties
- From the Domain Profile Tab; click Customize under Logging
- Select the Yes drop-down for Log dropped packets
- Take note of the Logfile Location and filename from the name field
- Click Ok to confirm
- From your PC or a Server PC; run the Get-WmiObject cmdlet once again so as to receive the error
- From the remote machine; run Notepad as Administrator and open the pfirewall.log file
- Identify the Drop Action from the Firewall that points to the time we ran the Get-WmiObject cmdlet and the source-ip (src-ip) of the machine you ran the script from
- Take note of the Protocol TCP/UDP and Destination Port Number (dst-port) Eg: 49155
- You can enable an Inbound Rule for this your problem will solved. If you are administering a large network; apply this to a group policy instead.
Video Tutorials are definitely a great thing and very interactive indeed. But I stumbled upon a site; which has no Video Tutorials but yet by far the best Tutorial Site for Smart Phones and Tablets that I have ever come across
They have tutorials across all well known brands; Alcatel / Apple / AudioVox / Blackberry / Ericssion / HTC / Huawei / Kyocera / LG / Motorola / Netgear / Nokia / Novatel / Pagers / Palm / Samsung / Sanyo / Sierra Wireless / Sonim / Sony and more
Below are links to a few popular ones
Tutorial for IPhone 5s
Tutorial for IPhone 5c
Tutorial for IPhone 4s
Tutorial for IPad Air
Tutorial for IPad Mini
Tutorial for Samsung Galaxy S5
Tutorial for Samsung Galaxy S4
Tutorial for Samsung Galaxy Note 3
Tutorial for Blackberry Z30