Ubuntu Server and Rsync – SSH into remote server and download latest files except files with a .part extension and email output

After reading through a bunch of troubleshooting threads, the following:

  1. Runs a shell  script via cron
  2. SSH into a remote server using a SSH key for a password
  3. Executes Rysnc with the options to delete source files after download, and skip files with the extension .part

Bash Script:


/usr/bin/rsync -havzPe 'ssh -i /home/alex/.ssh/id_rsa' --rsync path='/usr/bin/rsync' --remove-source-files --exclude='*.part' --stats bob@ /home/alex | /usr/bin/mail -s 'Rsync Output' root

Link Explain Shell

Crontab consisted of the following:

0 */2 * * * /home/alex/sync.sh >/dev/null 2>&1

This runs the shell script every 2 hours.  This was created using a this crontab generator.

Generating a SSH key for passwordless SSH login and exporting it remotely is explained here.

Generate the keys on your host server:

ssh-keygen -t dsa

Export the keys to the target server:

ssh-copy-id -i ~/.ssh/id_dsa.pub ross@remotehost [or enter ip address instead of hostname, e.g."remotehost"]

Configure email server so mail command works.

Digital Ocean’s Guide to PostFix


Google Protobuf – Generate C# POCO from .proto files using Protobuf-net

Google’s Protobuf code generator uses an API that many .NET developers may find a bit different than the usual MO.

An alternative to Google’s Protobuf implementation is Marc Gravell’s protobuf-net library, which uses an implementation that may make more sense to .NET developers. However, the code generator for this library is nowhere to be found in the nuget package. You can download it here.

The following is an example of executing the CLI tool

protogen -i:input.proto -o:output.cs

Google Protobuf: C# Generating a Class from a .proto file

The example found on the csharp tutorial page doesn’t work. Instead do the following

  1. Open visual studio, open nuget command line, type :Install-Package Google.ProtocolBuffers , link : ProtocolBuffers
  2. Find Package/Google.ProtocolBuffers.
  3. Use command line, type : ProtoGen.exe addressbook.proto -output_directory=C:\trash

Source: Stackoverflow Post

Update 6/13/2017

Marc Gravell has an online tool for generating C# code from a .proto file.



Ubuntu Server – Adding a new Hard Disk

First find the drive mounting point, usually located in /dev. In this example, /dev/sdd is the new disk.

sudo fdisk -l

Create a new partition on the drive

sudo fdisk /dev/sdd

Once in fdisk, press the following

  • d – to delete any partitions you want removed
  • n – create a new partition
  • defaults for partition number, start and end sectors on disk
  • w – write partition changes

Next format the disk

sudo mkfs /dev/sdd1 -t ext4

Create a mount point for the disk

cd /mnt
sudo mkdir sdd1
sudo chmod 777 sdd1
sudo chown  currentuser -R sdd1

Mount the disk

sudo mount /dev/sdd1 /mnt/sdd1 -t ext4

Edit fstab file

sudo vi /etc/fstab

add the line

/dev/sdd1 /mnt/sdd1 ext4 defaults 0 0

save the file and then

sudo mount -a

Reference: http://mikestechblog.com/ubuntu-antenna/add-a-second-hard-drive-in-ubuntu/1/






Issue SHA -2 or SHA256 SSL Certificate Request in Windows IIS 7

SHA-2 and SHA-256 are interchangeable terms – at least according to the internet.

Second, using the wizard linked in IIS Manager doesn’t default to SHA-2, instead it defaults to SHA-1. The wizard doesn’t even give you the option to issue certificate in SHA-2. Instead, you need to use a  MMC snap-in to do it. Directions detailed here:

Create a CSR with SHA256 signature algorithm

For future reference: Pdf Link.

Setting up Google Voice as your Voice Mail Box

After setting up your google voice account and phone number, dial the following code to forward your number.

Wireless Carrier or Network   —> Activation Code
AT&T Cingular, T-Mobile, GSM network: *004*1[GVnumber]*11#

Verizon (CDMA network): *71[GVnumber] AND *90[GVnumber] AND *92[GVnumber]

Verizon (TDMA Network): *74[GVnumber] and *73[GVnumber]

Bluegrass Cellular: *90#[GVnumber] and *92#[GVnumber]

Cellcom: *68[GVnumber]

Cincinnati Bell: *004*[GVnumber]#

US Cellular: *74[GVnumber]


Reference: Google Product Page

Windows 7: Removing the Windows 10 upgrade notification

There’s two ways – neither have been tried yet. This is for future reference – just in case.

From an elevated command prompt, run: "wusa /uninstall /KB:3035583".
 Then, hide the update when it is offered again.

wusa /uninstall /kb:3065988 /quiet /norestart
 wusa /uninstall /kb:2976978 /quiet /norestart
 wusa /uninstall /kb:3075853 /quiet /norestart
 wusa /uninstall /kb:3065987 /quiet /norestart
 wusa /uninstall /kb:3050265 /quiet /norestart
 wusa /uninstall /kb:3050267 /quiet /norestart
 wusa /uninstall /kb:3075851 /quiet /norestart
 wusa /uninstall /kb:2902907 /quiet /norestart
 wusa /uninstall /kb:3068708 /quiet /norestart
 wusa /uninstall /kb:3022345 /quiet /norestart
 wusa /uninstall /kb:2952664 /quiet /norestart
 wusa /uninstall /kb:2990214 /quiet /norestart
 wusa /uninstall /kb:3035583 /quiet /norestart
 wusa /uninstall /kb:971033 /quiet /norestart
 wusa /uninstall /kb:3021917 /quiet /norestart
 wusa /uninstall /kb:3044374 /quiet /norestart
 wusa /uninstall /kb:3046480 /quiet /norestart
 wusa /uninstall /kb:3075249 /quiet /norestart
 wusa /uninstall /kb:3080149 /quiet /norestart
 wusa /uninstall /kb:3083325 /quiet /norestart
 wusa /uninstall /kb:3083324 /quiet /norestart
 wusa /uninstall /kb:3035583 /quiet /norestart


Open GWX Stopper at http://ultimateoutsider.com/downloads/

Reference: Hardforums