Author Archives: aek82

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

Or

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

Reference: Hardforums

Vmware and Time Problems

ESXi server has issues syncing time across all virtual machines running Windows Server 2012. To remedy, set operating systems to manually sync time against external NTP servers.

 w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:manual /update

https://kickthatcomputer.wordpress.com/2013/03/06/configure-time-sync-on-windows-computers/

Dell Monitor Stuck in Power Save Mode

“Throughout the last six months I’ve come across computers at my work with monitors that just wont display at all. Instead I get the message, “Monitor is in power save mode, activate using PC.” Now this is happening when the PC is booted and running. Beyond turning on the PC’s power, how can you activate the monitor? Is this message an indication of some other problem?”

As someone who routinely runs into this issue, I’ve also been wondering about this for the last few months. I bought an old Dell E176 on Ebay for console access. Recently when I needed it for upgrading a few computers, this became a issue. After reading through the forum posts, it’s clear that Dell monitors have problems with there memory settings (in the monitor’s hardware, not the PC) and coming out of power save mode.

Solution

Unplug the power cord for the monitor from the wall and wait for about 10 seconds, then replug-in the monitor. This should force the monitor to come out of sleep mode and re-calibrate it’s settings. Unplugging the VGA/DVI cable doesn’t do this.

Afterwards, set your desktop power settings to never sleep the monitor. Otherwise, do the aforementioned again.

 

ASP.NET Webforms, WebMethod, JSON, and Jquery

Using JSON Serializers such as Newtonsoft’s JSON library is not needed in later versions of ASP.NET.

Instead, if you’re sending a JSON object via AJAX, the webforms framework will attempt to automatically deserialize the object into the type passed into the parameter and serialize the object when it is being returned to the page.

Example:

ASPX Page – Binding a button that submits a JSON Object

<script type="text/javascript">
   
    $(document).ready(function () {

        $('#<%=ButtonSubmit.ClientID%>').click(function () {
            var InputObj = {
                "InputObj": {
                    "IsAvailable": 0,
                    "Input": $('#<%=TextInput.ClientID%>').val()
                }
            }

            $.ajax({
                type: 'POST',
                url: '/Templates/UI/Views/MobileLocator.aspx/CheckZip',
                data: JSON.stringify(InputObj),
                contentType: 'application/json;charset=utf-8',
                dataType: 'json',
                async: true,
                cache: false,
                success: function (obj) {
                    if (obj.d.IsAvailable === '1') {                       
                        $('#divyes').reveal();
                    }
                    else {
                        $('#divno').reveal();
                    }                    
                }

            });

            return false;
        });
    });
</script>

CodeBehind – Static WebMethod

        [WebMethod(BufferResponse=false)]
        public static FormInputObj CheckZip(FormInputObj InputObj)
        {            
                                                  
                if (InputObj != null && !string.IsNullOrEmpty(InputObj.Input))
                {
                    bool iIsAvailable = false;
                   
                    InputObj.IsAvailable = iIsAvailable ? "1" : "0";

                    return InputObj;
                }
            

            return new FormInputObj { IsAvailable = "0" };
        }

    [Serializable]
    public class FormInputObj
    {        
        public string Input { get; set; }        
        public string IsAvailable { get; set; }
    }

The only things to note are the following:

When serializing the object into JSON format using Jquery, make sure the parameter’s name is the parent object. Example:

var InputObj = {
                "InputObj": {
                    "IsAvailable": 0,
                    "Input": $('#<%=TextInput.ClientID%>').val()
                }
            }

The “InputObj” matches the parameter name in the codebehind. This is needed or else ASP.NET will return an error. You must also call

JSON.stringify(InputObj)

when creating the parameters for data key in the $.ajax method.

When reading the returned object in the Jquery success event, you must reference the ‘.d’ in the returned object before calling the property of the strongly typed object.

 if (obj.d.IsAvailable === '1')

Most Q&A topics on Stackoverflow regarding this are outdated. Ignore any articles circa 2013 or earlier regarding this topic.

Reference:

http://encosia.com/asp-net-web-services-mistake-manual-json-serialization/