Is there a way to determine the .NET Framework version from the command line?

Share

Yes, according to this post.


reg query "HKLM\Software\Microsoft\NET Framework Setup\NDP" /s /v version | findstr /i version | sort /+26 /r

Share

Use BASH’s HEREDOC to automatically respond Yes / No

Share

The other day I had to run an mcollective shellcmd command, but I had to do it on a few specific list of server fed from a file. I used the –nodes <filename> argument but mco (mcollective’s CLI tool) required me to type “y” or “n” to the command execution:


Do you really want to run the command echo OK (y/n):

Continue reading ‘Use BASH’s HEREDOC to automatically respond Yes / No’ »

Share

How do I delete a single email from a conversations in Gmail?

Share

The other day I got a whole bunch of emails from a notification service into my Inbox, about 30 or so. Then a manager replied to one of them and kept the same subject. That caused Gmail to add his reply into the Conversation View of the notifications thread, causing me to have a huge thread or some 30+ emails (the original notifications + our team’s replies).

So how do I split the conversations so that I remove all of the notifications from the view, delete them and keep only the team’s replies? Easy!

Continue reading ‘How do I delete a single email from a conversations in Gmail?’ »

Share

Export iPhone contacts to a vcf file and import them to Gmail contacts

Share

So you finally decided to get an Android device. I would like to reinforce you and your decision to remove the shackles that Apple enforced on your smartphone and for becoming a free soul. Welcome to the free world, Android.

And let me make that transition that much easier. Do you need your contacts to be on your Gmail contacts account? This is how you can do that in a few simple steps.

Continue reading ‘Export iPhone contacts to a vcf file and import them to Gmail contacts’ »

Share

Embed a YouTube video in a GitHub Markdown

Share

While it isn’t possible to directly embed a YouTube video, you can link to it with a custom image.

In markdown

This:

[![A Cleveland Heist motorcycle on the roads of Israel][1]][2]

 [1]: http://img.youtube.com/vi/aWhwGLHBZgI/0.jpg "A Cleveland Heist motorcycle on the roads of Israel"
 [2]: http://www.youtube.com/watch?v=aWhwGLHBZgI

Turns to this:

A Cleveland Heist motorcycle on the roads of Israel


Or user pure HTML

This:

<a href="http://www.youtube.com/watch?v=aWhwGLHBZgI" target="_blank" title="A Cleveland Heist motorcycle on the roads of Israel"><img src="http://img.youtube.com/vi/aWhwGLHBZgI/0.jpg" width="240" height="180" /></a>

Turns to this:

Share

Your system administrator does not allow the use of saved credentials to log on the remote computer

Share

When you try to save the credentials for Remote Desktop Connection client, and you get this popup saying: “Your system administrator does not allow the use of saved credentials to log on the remote computer xxx.domain.com” because its identify is not fully verified. Please enter new credentials.”

Your credentials did not work

Windows security – Your credentials did not work

Continue reading ‘Your system administrator does not allow the use of saved credentials to log on the remote computer’ »

Share

Distributed CPU power across multiple machines to render video files using HandBrakeCLI.exe (HandBreak)

Share

Output files after recording using Shadowplay come out in variable frame rate. While that’s all good and dandy, professional software like Adobe Premiere Pro CC, work only with constant frame rate (Google it).

So to overcome this limitation, using HandBreak to render the files and have constant frame rate is the best solution I’m using.

Having said that, a 30min round of 1080 Full HD recording, make for a pretty large output files, in total of approx. 2-3 while the first is 4gb and the 2nd might be smaller… it depends but it doesn’t really matter.

After recording several rounds and wanting to go to bed, now starts the night shift for my PC and Laptop to render the files to be ready for editing before they are uploaded to my Youtube channel.

Using this script, you can utilize multiple machines connected to the same network, so that each machine picks a file from the list to render. Each machine will go on to render the file, in its own pace and move on to another, when done.

My handbreak script on Github

Share

Update Backblaze Control Panel schdule using a simple Ruby script

Share

I use Backblaze to backup my PC, but when I need my Internet bandwidth, I always disable the backup so it won’t bother me.

I wrote this small Ruby script to help me change the value from one to the other.

Note that the updated version can be downloaded freely from my github repository: https://github.com/shai/Open-Source-Code

Continue reading ‘Update Backblaze Control Panel schdule using a simple Ruby script’ »

Share

Using Robocopy to backup my Android phone

Share

Once I connect my phone to the USB, and turn on the USB storage to allow my Windows machine to recognize both the phone and sd card has drives F: and G:, this is the script I run to make sure each storage is always copied to the same location on my D: drive backup path.

Continue reading ‘Using Robocopy to backup my Android phone’ »

Share

GNU Screen – Naming Windows (Titles)

Share

For some reason, I couldn’t use the (C-a A) keyboard sequence to set the title on a remote machine. In order to fix this, I could utilize the “title-string escape-sequence (<ESC> k name <ESC> \)”.

This means, that a simple echo from bash can set the title, so here’s a simple script that would do this for me 🙂


#!/bin/bash

[ -z "$1" ] && { echo 'Usage: $0 <title>' ; exit 0; }

echo -en '\033k'$1'\033\\'
echo 'Set title to: '$1'. Check it please.'

Share