Wednesday, November 23, 2016

Monday, November 21, 2016

What is my IP from *nix

Just for my own reminder:
dig +short myip.opendns.com @resolver1.opendns.com

Friday, October 21, 2016

Test your SSL certificate before deploying into Apache

Put key, cert and CA in a directory. Confirm the below outputs no errors and ends in ‘ACCEPT’:
site=sample.com
cacert=GeoTrust_CA_Bundle.crt
openssl s_server -accept 9090 -www \
  -cert ${site}.crt -key ${site}.key \
  -CAfile $cacert

Change User Agent in Chrome 53

]Right click | Inspect | Vertical three dots menu | More Tools | Network Conditions:
Thanks to Williams Medina for pointing this out.

Saturday, August 27, 2016

Stop Apache from rendering icons README file

If you try to access /icons/README or /icons/README.html from your domain and you get a page with content, then you know apache is running on the server side and exposing some default content. How bad is that? Probably not big deal but its removal is mandatory when it comes to hardening apache for most situations. Better not to give the public any chance to access a resource that should not be exposed. You can correct this with s simple POB recipe:

Thursday, August 25, 2016

No Physical Windows Login Screen after accessing it via RDP?

Use Windows logo key + P keyboard shortcut which is intended to extend the desktop to multiple monitors. Why you need to do that and not just hit a key or move your mouse is an excellent question. To me, it is a bug.

Monday, August 22, 2016

Show version number in jenkins job history

Everybody handles versioning in a different way but if your jenkins job sends the version to the output stream you can use the below steps to show such version in the build history. This is handy specially for test jobs as you want to make sure that tests did pass for that specific version.

Let us assume that your job prints something like "Front-End Version: 1.2509". Here is how you print the version number in the jenkins job history:
  1. Install "Groovy Postbuild" plugin.
  2. Add a post build action type "Groovy postbuild"
  3. Insert the below in "Groovy Script" and save
    def m = manager.getLogMatcher("^.*Front-End Version: (.*)\$")
    // to debug using job logs
    // manager.listener.logger.println("found version:" + m.group(1))
    if(m != null && m.matches()) {
      version = m.group(1)
      manager.addShortText(version)
    }
    
  4. Run the job and you will get the version number next to the build.

Followers