So once again I have stumbled upon a script where I needed to send notifications. E-mail comes as the default choice, but there are so many referneces and… what works on one machine does not seem to work on another. Why?.. Read on.
One year into guitar practice revamped – moved!
This post and all guitar-related content is moved to the Keen Player site. Please support the new website with your visits!
Continue reading “One year into guitar practice revamped – moved!”
Picking an electric guitar (again) – moved!
This post and all guitar-related content is moved to the Keen Player site. Please support the new website with your visits :).
Continue reading “Picking an electric guitar (again) – moved!”
Again on Python and unicode
Yes, there are numerous good articles on the subject, but still every time I am stumbled upon infamous
UnicodeEncodeError: 'charmap' codec can't encode character u'\u0306' in position 50: character maps to <undefined>
and I have to research it again. Somehow it does not stick. Perhaps because it just should have worked “out of box”. Anyway. Hereby a small recipe that “shuts the unicode nagging” in Python 2 when enumerating all the files:
import sys import codecs sys.stdout = codecs.getwriter('utf-8')(sys.stdout, 'strict') for root, folders, files in os.walk(unicode(path), 'utf-8'): print u'%s\r' % root, <do whatever you want with the files></div>
My New Year book list
So here we come. Another year passed by, some new challenged ahead and some old habits still stuck. So hereby the list of books I am looking for going through to start a great year ahead.
So here we come. Another year passed by, some new challenged ahead and some old habits still stuck. So hereby the list of books I am looking for going through to start a great year ahead.
Mechanical keyboards for typing and coding
So this is I guess my turn to get into the mechanical keyboards craze. After several times trying to get my mind off spending “too much” money on an input device and stick to infamous Microsoft Natural Ergonomic Keyboard 4000 I stepped over to the “mechanical side”. Was it worth it? Let me share my experience with you.
So this is I guess my turn to get into the mechanical keyboards craze. After several times trying to get my mind off spending “too much” money on an input device and stick to infamous Microsoft Natural Ergonomic Keyboard 4000 I stepped over to the dark mechanical side. Was it worth it? Was it worth it? Let me share my experience with you.
Continue reading “Mechanical keyboards for typing and coding”
Blog moved to a new hosting!
Due to numerous setbacks with previous hosting and the sheer slowness of access I finally decided to move the whole thing (including a bunch of other sites I own) to the new hosting.
Resolving network connection issues on Linux Mint (Ubuntu)
So several years after purchasing my smallest form-factor netbook Aspire One I have stumbled upon issue that I couldn’t explain myself. Hopefully this would help somebody and save time it took me to figure out.
Background
The Aspire One was the only netbook with descent (2GB RAM at that time) amount of memory and Linux installation out of box (=minimal support guaranteed). I have used for some time, but than gave up for a while since keyboard proved to be a bit too cramped for my palms and fingers, so extensive use caused some pain. Still it is a nice little piece of hardware that is easy to transport, not expensive (meaning if gets stolen or broken I won’t cry over it :)) and, finally, it is a full-fledged Linux-powered thing with real (althoguh small) keyboard large enough hard disk to host my music collection. All in all, after some time I decided to give it a try.
Continue reading “Resolving network connection issues on Linux Mint (Ubuntu)”
Tips for using JSON WordPress API for JetPack-powered websites
Being a lazy person I prefer to automate as much as possible instead of performing routine work manually. Well, you need to make it once to know what you need to automate, but that is where it stops for me.
So I had a goal of preparing and publishing a number of posts on my (only in Russian for now, sorry) website for motorcycle enthusiasts, where the data could nicely fit into a database and when available it can be wrapped in a template and posted. OK, I need to get the data myself, but publishing tenth of posts is NOT an option. Luckily I had already Jetpack installed, which gave me access to the JSON API.
I will describe separately how to obtain the proper authorization tokens (not sure I can repeat it, it is made for confusion, not sure about security though). When you do have those you can use API. My favorite language of choice for automation is Python, therefore I started typing code before even thinking of selecting a different language.
Continue reading “Tips for using JSON WordPress API for JetPack-powered websites”
Manipulating files with @ sign in a subversion repository
Apparently it was a while ago since I had troubles with infrastructure :), but this time it took too long to leave it unnoticed. Quite some time ago I have created several files in the subversion repository with the ‘|’ character in them, which gave problems checking them out on a Windows… ehm… box (if you can call Surface a box :)).
Continue reading “Manipulating files with @ sign in a subversion repository”