The .NET CountdownEvent class

Read more →

Python’s mock library’s patch is confusing to say the least. A quick tip how to target the right object to patch

Read more →

While I knew about Alpine Linux and have been using them to create smaller docker images, I just came across Iron.io’s set of alpine based container images for pretty much every major programming language. If you haven’t come across Alpine yet, it’s a tiny (5mb) security focused linux distribution based on musl libc & busybox. What’s nicer is that they also have dev images which allow you to use images for development workflows as well.

Read more →

Here’s a small Ultisnips snippet for creating a TOML front matter header for Hugo snippet post "blog post" +++ author = "Raghu Rajagopalan" date = "`!v strftime("%FT%H:%M:%S").strftime("%z")[:2].":" . strftime("%z")[3:]`" publishdate = "`!v strftime("%FT%H:%M:%S").strftime("%z")[:2].":" . strftime("%z")[3:]`" tags = ["easyblogger", "blogging"] title = "${1:title}" lastmod = "`!v strftime("%FT%H:%M:%S").strftime("%z")[:2].":" . strftime("%z")[3:]`" +++ $0 endsnippet To update the last modified date on save, put this little autocmd in your .vimrc augroup AsciiDoc au!

Read more →

Made a few changes to EasyBlogger to support migrating from Blogger to Hugo. Changes are: In easyblogger get, the count is now optional [earlier defaulted to 10]. This now lets to slurp down your all blog posts if you so wish. Support for Hugo front-matter in TOML format. Generated files above will use post metadata to create TOML headers in each file - like so. The current permalink is preserved as an alias.

Read more →

Blog.Reboot()

hugo blogging

I’ve been considering moving away from blogger and using one of the static site generators for my blogging needs. There’s quite a few things in the way though - migrating content, search engine rankings and then the fidelity of the migration. The last time wasn’t too easy so I’ve been putting it off for sometime…​ finally, I’ve gotten around to it and it took some doing. My blog was initially on Wordpress.

Read more →

Proxy pac file to switch proxy based on whether I’m connected to OpenVPN or not. Basically, OpenVPN IP is 10.8.0.6 and at home I have 192.168.1.xxx - so if either of those two are available, then I bypass proxy. function FindProxyForURL(url, host) { // firefox - Ctrl-Shift-J Chrome/Chromium: chrome://net-internals/#events var debug = true; var log = function() { if (debug) { var args = Array.prototype.slice.call(arguments); alert(args.join(" ")); } } var bypassProxy = false; log("

Read more →

Just pushed out a minor update v1.2.4 to Easyblogger This release now let’s you get blog posts by url # get a post by url $ easyblogger get -u "https://blog.rraghur.in/2015/06/js-development-2015.html" 658290074469501527,JS development - 2015,/2015/06/js-development-2015.html

Read more →

So this post is more a memory aid for me rather than anything as I transition over to using asciidoc for my blogging/general technical writing needs. Content is almost verbatim from the asciidoc online user manual - but since I have to wrangle blogger css a bit, this is basically to check if everything works as advertised on the tin styling wise. Code with callouts using log4net; using log4net.Config; using log4net.

Read more →

I’ve been a markdown user almost exclusively - more due to github and stackoverflow popularizing the format. Markdown is great for lightweight markup and with excellent tools like Pandoc, it’s a joy to produce good looking technical docs. Suffice to say that I’ve been taken with markdown and even use it to produce word documents and such. While Markdown is great, it has it’s share of niggles - try to go beyond the basics and want some advanced features and you get into trouble.

Read more →