AWS Certified Associate

After an extended hiatus away from AWS certification, finally I’m certified at the Associate level, 3 times over!

Photo 18-4-18, 1 16 13 PM.png

To date I’ve taken and passed:

  1. Certified Developer – Associate
  2. Certified Solutions Architect – Associate
  3. Certified SysOps Administrator – Associate

AWS has a nice road map, so I just re-purposed the following image off their site:

AWS_Certification_Roadmap_April_2018.d51f56ef22f8d98ad54423c132a976eab2b94abf

I’m told that the Professional level exams are much harder, but that’s a post for another day…

#aws

Late as a Cygwin user…

… but hey, better late than never!

So I was just complaining about how PuTTY doesn’t seem to handle SSH keys (e.g. AWS, Azure) very well, and then I came to (belated) realization that because rsync can be used in Windows via Cygwin, so can ssh.

Now I don’t waste time in a UI managing PuTTY profiles, generating PPKs, or fidding with regedit.exe to clean up cached host fingerprints.

Try Cygwin, today.

#microsoft, #red-hat

SOLVED: Clear cached PuTTY’s SSH keys

For all those of you who have been trying to clear Putty’s cache of host fingerprints (Windows) for development or testing, here is the answer:

1. Open the registry (regedit)
2. Go to HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys
3. Delete the rows that you need and presto!

Nice, TIL.

#putty, #windows

SOLVED: The mystery of the disappearing laptop screen brightness slider

Updated for Windows 10.

I noticed that with the power turned off at boot time, I’d be unable to adjust my screen brightness. Instead of the usual 3 options (Turn off the display, Put the computer to sleep, and Adjust plan brightness), just 2 were available; i.e. Adjust plan brightness” had disappeared!

This is probably due to a bad driver (e.g. TeamViewer). The workaround is to restart Windows with the power plugged in, but this is a bothersome fix.

A better solution is to hit Windows + x: Device Manager: Monitors: (Select your monitor): Properties: Driver: Uninstall.

Post-uninstall, click Action: Scan for hardware changes. Your monitor should reappear, this time with the good driver installed.

http://social.technet.microsoft.com/Forums/en-US/w7itprohardware/thread/08a3eb1d-b698-4639-af4b-5278b721fcdc/

#microsoft, #teamviewer

Hyper-V: Slow Guest Network Performance

A couple weeks ago, I discovered that guest network performance was abysmally slow, copy-pasting files from host to guest (RDP) felt like it took days instead of the (expected) minutes! This delayed the commissioning of a new application, and it bugged me for a bit. Later on, a different guest exhibited the same issue; i.e., I could actually see the images it sent over being (very slowly) downloaded in the browser…

After a bit of Google-ing and experimentation, it appears to be related to a NIC issue (our HP server uses Broadcom) and this Virtual Machine Queues (VMQ) option in Windows Server 2012 R2. It’s weird that it hasn’t already been resolved by Broadcom/Microsoft, but here’s the full Reddit link if you need more details.

Do note however that I tried out the Registry update (BelowTenGigVmqEnabled=1), but it didn’t work in my case. I’m just going to quote from the the Redditor in closing:-

My world is beautiful.

Microtik port forwarding

Spent too much time configuring port forwarding (RDP) on my (Microtik) RouterBoard 751G-2HnD. The solution, as usual, was buried in a May 2014 forum post. There needs to be TWO (2) NAT rules enabled; i.e. to forward traffic to/fro the router/server.

In this case, 192.0.78.13 and 10.0.0.254 refers to the router’s WAN and LAN IPs respectively, and 10.0.0.243 is the intended recipient of my RDP traffic.

[admin@751g2hnd] > /ip firewall nat print
1 chain=dstnat action=dst-nat to-addresses=10.0.0.243 to-ports=3389 protocol=tcp dst-address=192.0.78.13 dst-port=3389 log=no log-prefix=””

2 chain=srcnat action=src-nat to-addresses=10.0.0.254 to-ports=3389 protocol=tcp dst-address=10.0.0.243 dst-port=3389 log=no log-prefix=””

Many thanks to The Digital Doctor (http://forums.ncix.com/forums/topic.php?id=2662521)!!

Web: Google Reader send to Springpad

Awhile back I decided to start using Springpad for bookmarking and notes. It’s worked out pretty well so far (but it’s a bit slow).

Springpad has various ways of saving stuff; e.g. browser extensions, a bookmark-let, email but I was looking a way to feed stuff from Reader (which I love); i.e. without opening a new window, waiting for the page to load and then finally using either the extension or bookmark-let to save it to Springpad. It’s just so… slow.

So I extracted the URL from their bookmarklet, and I found that it works well w/ a custom Reader’s “Send to” option. There are a bunch of defaults (e.g. Blogger {of course}, Delicious, Instapaper) but none for Springpad. Fortunately, it is possible to manually setup a custom link. 3 fields are required: Name, URL and Icon URL, plus there’s some documentation about field mapping. If all this sounds a bit alien, that’s ok, here’s what you want for each field:

Name: Springpad
URL: https://springpad.com/clip.action?url=${url}&title=${title}
Icon URL: https://springpad.com/favicon.ico

Voila:reader-send-to-springpad

Failed dependencies when installing rpmforge

Got this error today whilst trying to install collectd, which is kindly provided by RPMForge:

$ sudo rpm -i rpmforge-release-0.5.2-2.el6.rf.i686.rpm
error: Failed dependencies:
rpmlib(FileDigests) <= 4.6.0-1 is needed by rpmforge-release-0.5.2-2.el6.rf.i686
rpmlib(PayloadIsXz) <= 5.2-1 is needed by rpmforge-release-0.5.2-2.el6.rf.i686

Googled about it for awhile, nothing forthcoming. Now, if you ‘rpm -qa | grep rpmlib’ no results will return. The actual package name is ‘rpm-lib’.

So after awhile I noticed that the versions stated above were higher than the one I had installed, and I’d just done a ‘yum upgrade’. That was swiftly followed by the “el6” part, and that I had completely missed out the title “1. RPMforge for (upcoming) CentOS 6”. Well done.

So if you get the error in CentOS 5, it’s because you were trying to install an .rpm for CentOS 6. The correct URLs are:

i386: http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
x86-64: http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

#red-hat

CentOS: rpmbuild-ing Vim w/ Ruby support

Recently I switched from Ubuntu 11.04 to CentOS 5.7, only to find out that CentOS’s version of vim was build sans Ruby support:

$ vim --version | grep ruby
+python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent

“-ruby” means that Ruby support is not available. This was an unhappy moment, as I’d been a big fan of Command-T, an excellent plugin for Vim requiring Ruby support. There are a couple of blog posts about it, but required consolidation, so here is my (mostly) repost on the solution.

The posts recommend setting up an “rpmbuild” environment for building from source, which is basically user “rpmbuild”, plus a “~/.rpmmacros” definition, plus the source RPM.

1. If “rpmbuild” already exists, the following part is not required:

# useradd rpmbuild

2. Now switch to “rpmbuild”:

# su - rpmbuild
$ vim ~/.rpmmacros

3. “.rpmmacros” is a file with the following contents:

%_topdir /home/rpmbuild/rpm
%_tmppath /home/rpmbuild/rpm/tmp

4. My build is for x86_64, so replace “$ARCH” with “x86_64”:

$ mkdir -p rpm/{BUILD,RPMS/$ARCH,RPMS/noarch,SOURCES,SRPMS,SPECS,tmp}
$ mkdir -p rpm/{BUILD,RPMS/x86_64,RPMS/noarch,SOURCES,SRPMS,SPECS,tmp}

5. Next, get the source RPM, removing the “perl-devel” dependency from “vim.spec”:

$ cd rpm/SRPMS
$ wget http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/vim-7.2.411-1.6.el6.src.rpm
$ cd ~
$ rpm -Uvh --nomd5 ~/rpm/SRPMS/vim-7.2.411-1.6.el6.src.rpm
$ vim rpm/SPECS/vim.spec

BuildRequires: python-devel ncurses-devel gettext perl-devel
BuildRequires: python-devel ncurses-devel gettext

6. Now we are ready to start the build process:

$ rpmbuild -bb ~/rpm/SPEC/vim.spec

7. If “rpmbuild” is not installed — mine wasn’t — use “root” to install “rpm-build” first:

# yum install -y rpm-build

8. Assuming #6 completed successfully, we can use “root” to install the built RPMs:

rpm -Uvh ~/rpm/RPMS/x86_64/vim-{m,c,e}*

References

http://m.linuxweblog.com/vim-ruby-centos
http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment
http://www.lamolabs.org/blog/2662/fixing-ruby-support-in-vim-on-fedora-10-11-and-centos-5-installing-the-vim-textile-plugin/

#red-hat, #ruby, #vi

OCIEnvNlsCreate() failed

Wanted to work on an Oracle project from home last weekend, but I received this message:

Warning (2): ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system – please check that ORACLE_HOME and LD_LIBRARY_PATH are set and point to the right directories [CORE/cake/libs/model/datasources/dbo/dbo_oracle.php, line 171]

A little bit of system background here. I’m using Linux Mint 8, running oracle-xe 10.2.0.1-1.1. oci8 was compiled via pecl, with one notable difference from my previous guide. I did not use instantclient (i.e. instantclient,/usr/lib/oracle/11.1/client/lib), so the phpinfo output for the oci8 section was quite different.

It looked like:

OCI8 Support enabled
Version 1.4.1
Revision $Revision: 293235 $
Active Persistent Connections 0
Active Connections 0
Compile-time ORACLE_HOME /usr/lib/oracle/xe/app/oracle/product/10.2.0/server
Libraries Used -Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -lclntsh
Temporary Lob support enabled
Collections support enabled

I did some searching. I figured it was something to do with environment variables, as my colleague had helped me to resolve the problem previously. I’d forgotten the fix, so this post will serve as a reminder, if needed.

Now ORACLE_HOME and LD_LIBRARY_PATH were defined via my .bashrc, which consists of just one line:

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
echo $ORACLE_HOME
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
echo $LD_LIBRARY_PATH
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:

Some people suggested using Apache’s SetEnv — which I tried — but the error did not go away. That same colleague suggested this morning I use the envvars file in Ubuntu instead, which helped to resolve my problem, at least:

Adding these two lines solves my problem:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:

Seriously, my journey with Oracle has always been a rocky one. I wonder why this product is so… inaccessible.

#apache, #oracle, #ubuntu