Posts

Showing posts from June, 2019

Fix: The Diagnostic Service Host service failed to start due to the following error. [ solved, no kidding ]

Image
Lots of these Messages about the Diagnostic Service Host in the System Log On Windows 7/10 Machines Attached to A Domain The Diagnostic Service Host service failed to start due to the following error: A privilege that the service requires to function properly does not exist in the service account configuration. You may use the Services Microsoft Management Console (MMC) snap-in (services.msc) and the Local Security Settings MMC snap-in (secpol.msc) to view the service configuration and the account configuration.  The good news is that you can fix it using active directory group policy or the Local Security Policy and just adding a few things to the Local Policies.  Same fix applies to both Windows 7 and Windows 10.  To Fix this using any Policy, you must be running a Professional or Enterprise version of Windows. If you have Home Edition, sorry. Here's How to Fix It You see this in your system logs repeatedly, and its dragging down your computer and making it run slow. 

How to setup Rabbit SVN client in Ubuntu 14.04 LTS

RabbitVCS  is a graphical front-end for version control systems available on Linux. It integrates into file managers to provide file context menu access to version control repositories. The project was originally called  NautilusSvn , but due to the desire to support file managers in addition to Nautilus and more version control systems, it was renamed to RabbitVCS. Step 1: Open your Terminal  press  Ctrl+Alt+T. Step 2: Run the following commands one by one RabbitVCS team also maintaining  PPA  for Ubuntu and Debian systems. Use the followings commands to add RabbitVCS ppa in your system install required packages. $ sudo add-apt-repository ppa:rabbitvcs/ppa $ sudo apt-get update $ sudo apt-get install rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus3 Step 3: Restart your ubuntu desktop. You have successfully installed Rabbit SVN Enjoy. To remove Rabbit SVN client Step 1: Open your Terminal Step 2: Run the following command. sudo apt-get remove rabbitvcs-

Useful Web Development Hacks and Useful Tips

Javascript, HTML and PHP Tips and Shortcuts Change the URL in the browser address bar.  A useful hack to so that when you have an <A HREF="#" > and an OnClick handler, your browser addressbar will get cleaned up. Changing only what's after hash - old browsers document . location . hash = 'lookAtMeNow' ; Changing full URL. Chrome, Firefox, IE10+ history . pushState ( 'data to be passed' , 'Title of the page' , '/test' ); The above will add a new entry to the history so you can press Back button to go to the previous state. To change the URL in place without adding a new entry to history use history . replaceState ( 'data to be passed' , 'Title of the page' , '/test' ); Make and Install a Favicon using this favicon generator:   https://www.favicon-generator.org/   upload your favicon image and then download prepared set of images and some html code.

How to Make A Keymaker in C-Sharp

Image
You can reverse engineer .Net programs to find out how other software developers protect their applications.  It is a good exercise that will teach you how to make a better software protection scheme.  The first thing to do is get a good set of reverse engineering programs. I recommend dotPeek32. DotPeek32 can open up a .Net program and show you the source code.  Dot.net programs are merely interpreted and not true machine code. They are Microsoft's famous JustInTime compiled with CLR run time code. Using DotPeek or RedGate .Net Reflector, you can easily reverse engineer any application.  My simple keymaker serves as an example of how you can make keymakers using one that I found inside an obscure industrial service application.  You could use the same things in your own application, although I would recommend extending it to 32 characters. The Simple keymaker UI the code shown below is the called Sample_Keygen.Form1. It is the event handler for the "Get Key" button

Shoretel Read-Only VB.Net Database Connect Strings for custom CDR Applications

Image
Shoretel read-only Database Passwords Shoretel Logo Have you ever wanted to write your own custom Shoretel/Mitel CDR database reporting application?  If you need root access to the database for read-write operations see this blog entry.   In visual basic dot net, the connect string would look like this: Dim conn1Str As String = "server=shoretel64;user=st_cdrreport;database=shorewarecdr;port=4309;password=passwordcdrreport;" Dim conn2Str As String = "server=shoretel64;user=st_configread;database=shoreware;port=4308;password=passwordconfigread;" Pretty Formatted: Dim conn1Str As String = "server=shoretel64;user=st_cdrreport;database=shorewarecdr;port=4309;password=passwordcdrreport;" Dim conn2Str As String = "server=shoretel64;user=st_configread;database=shoreware;port=4308;password=passwordconfigread;" Assuming your server is just called shoretel64

Sudden Magento Failure - The session id is too long or contains illegal characters + Can't retrieve entity config

Image
Magento Failure You'll be cooking soon. Suddenly, your magento starts showing error reports instead of shopping carts. Your product pages just show an error exception. And you cannot logon. One of the basic skills that a good Magento cart builder needs to know is how to recover their server from near death.  We are quite skilled at all things Magento . Here's how to fix it by deleting the cache and session pool, once you do this, you will be cooking with gas again. So, you look in var/report and find the report file, and the first things it says is: a:5:{i:0;s:46:"Can't retrieve entity config: sales/quote_item";i:1;s:4545:"#0 /home/needfulthings/public_html/app/code/core/Mage/Core/Model/Resource.php(282): Mage::throwException('Can't retrieve ...') #1 /home/needfulthings/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(276): Mage_Core_Model_Resource->getTableName('sales/quote_ite...') Plus in ./var/log/sy

Using The Shoretel 90V Serial Console to Factory Reset

Image
How to Connect to the Shoretel 90V Serial Console Like a Boss You just bought a pre-owned Shoretel 90V from a grey market source, and now you find that you cannot logon anymore as anonymous.  The Shoregear90V is quite different from the Shoregear 90.  For one, it runs WindRiver Linux on top of VXWorks,  Whereas the Shoregear 90 just runs WindRiver VXWorks.  As a result Shoregear90V boots into Linux, while Shoregear 90 just has the old familiar VXWorks configuration pages. Both of them have a RS232 serial port that you can use to configure them.   Shoretel is full of hidden and secret passwords, including a secret CDR database with its own passwords . The Shoretel switch is no exception.  You may need to factory reset it, or you just need to set the root password.  Well, here are some ways to get in.  First step is to get a RS232 serial port added to your computer. You can always use a USB to Serial adapter (such as the venerable Tripp-Lite Keyspan USA-19HS) or you can just use the

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data Suddenly it happens, your PHP page shows this message in red: "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" and you don't know why. Somewhere in your code, you were using curl and were playing with the headers. You must have inserted this command: header('Content-Type: application/json');  To Fix this error: you need to insert this statement right after you are done with JSON. header('Content-Type: text/html; charset=utf-8');

Install a SSL Certificate into Remote Desktop / Terminal Server using MMC

Image
How to Install a SSL Certificate into Remote Desktop / Terminal Server This little tech tidbit is for those who like to use terminal servers or remote desktop to logon to their servers.  I will explain how to install a trusted certificate into terminal services. The first thing you need to do is the get a SSL certificate as a Standard PEM. You can get free SSL from SSLForFree.com , you should download the certificate and then use SSL Shopper's conversion tool to convert it to PFX/PKCS#12 form.   My advice is to use GlobalSign's AlphaSSL Standard Certificate, which will give you an X509 and a PKCS7.  As for generating a private key, see this How To Guide blog article. Step 0: Use certlm.msc to request a new certificate.  Right Click on Personal->Certificates, and then choose "All Tasks" -> "Advanced Operations" -> "Create Custom Request" thru the pop up menus.  In the Certificate Enrollment's Custom Request, you are going to choos

Get A Free SSL Certificate and Use Free Conversion Tools

Image
How to Get A Free SSL Certificate A Free SSL? Really? There was a time, not too long ago, perhaps around the dawn of the E-Commerce age, around 2007, when you could be expected to pay over $500 for a single domain Thawte SSL certificate.  Well, those days are long gone. Expensive SSL certificates are a relic of a bygone era. SSL can so expensive if you don't shop around, but now there are now free options. It's called SSLForFree.com and Let's Encrypt. https://www.sslforfree.com  You can get 90 day comodo certificates and a handy reminder to help you remember to renew it.  This is one of the first things you need to do while building your business website . SSL For Free? Finally. Discounted SSL There are some websites that sell discounted SSLs from Comodo. SSL2BUY https://www.ssl2buy.com/ SSL Decoder https://www.sslshopper.com/certificate-decoder.html SSL Converter https://www.sslshopper.com/ssl-converter.html To convert your certificate from a St