Posts

Showing posts from January, 2016

Quote of the day

"The world doesn't make sense until you force it to." ~Frank Miller.

Generate snapshots report of all VMWare virtual machines using PowerCLI

Ok, so I heard that you're tired of going to every virtual machines in your VMWare vCenter and checking for snapshots that need to be removed. VMWare has provided a solution that can ease your pain, It's PowerCLI . In short,  PowerCLI is a Windows PowerShell interface for managing VMware vSphere. It comes with a lot of useful cmdlets that will help you manipulate your VMWare infrastructure smoothly and painlessly (sort of) including automating tasks. Here is how I can generate a snapshots report of all the virtual machines in my VMWare 6 environment: 1. In a Windows Server 2008 R2 SP1 (or Windows 7 and above), install these dependencies: vSphere client v6 for windows: download here . Microsoft Management Framework 3.0 : download here (for Windows Server 2008 R2 SP1, I will download Windows6.1-KB2506143-x64.msu package) 2. Download and install PowerCLI: Download the latest PowerCLI here . It's PowerCLI 6 R3 at the time I write this article. 3. Open Powe

Hide desktop icons in Ubuntu 14.04 using Nemo files manager

You can just run this command to hide all the desktop icons in Ubuntu 14.04 that is using Nemo files manager: $ gsettings set org.nemo.desktop show-desktop-icons false

Use FileBrowser package as the right sidebar of Sublime Text 3

Image
Do you want to move the sidebar of Sublime Text from the left to the right like me? Unfortunately, you can not do that. The sidebar is not movable. But, the good news is there is an alternative solution which is great: FileBrowser for SublimeText Github repo: https://github.com/aziz/SublimeFileBrowser What we are going to do to have a right sidebar is to use FileBrowser package in a split windows mode (and you should hide the default sidebar via menu View > Sidebar > Hide sidebar). 1. Install SublimeText's Package Control: a. Open the console by enter "CTRL + `" combination keys b. Paste this into the console: import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'htt

Generate excel file with openpyxl in Django

I find this python module quite interesting and useful for my Django project: openpyxl :  https://openpyxl.readthedocs.org/en/default/ Here is a sample snippet: It allows the user to generate the excel file and download it.

Quote of the day

"Don't choose the better girl. Choose the girl that's gonna make you the better man."