tech

The elusive bug

published on
(Note: This is something that happened earlier this year. A recent discussion reminded me that I should write about it and here it is) Symptoms The bug description wasn’t very helpful. The users couldn’t scroll on their Macs on this one website. Only on a few Macs, not all of them (for one, no one could reproduce this locally). Other operating systems (including iOS) worked fine for them. Other websites scrolled just fine. Read More...

How secure are Indian payment gateways?

published on
India has a dearth of good payment gateways – most have obsolete difficult-to-use APIs requiring days, if not weeks, to integrate. They require at least a dozen documents (most of them need them sent through post) before they even let you inside their walled garden. Additionally, gateways have complicated plans – depending on your initial spending budget you can get a deal for 3% or otherwise end up paying 5%. Of course, you can also haggle. Read More...

KWallet Security Analysis

published on
KDE 4.12 comes with a KWallet GnuPG backend, which is more secure. More info here, including how to move existing wallets. (Note: Tom Leek has written a more detailed analysis on StackExchange.) I started using KWallet a few months ago to stop reusing same passwords on multiple sites. Using KDE Wallet plugin for Firefox, I setup my passwords to be automatically stored in a KWallet file, which was the best solution I found for Firefox on Linux (other than Lastpass, but it stores passwords remotely and is closed source, which I don’t prefer when dealing with passwords). Read More...

QTreeView and custom filter models

published on
I’ve been learning PySide which is an amazingly easy library to get into GUI development. For an application I was developing, I needed a search filter for some hierarchical data represented by QTreeView. QSortFilterProxyModel is the default choice to add a filter to a QTreeView, but it, by default, applies the filter to all nodes from any root to leaf. If any node has to show up in the search result, all the nodes from a root to that node have to match the search filter, which is mostly useless for hierarchical data. Read More...

Streaming to twitch.tv from Linux

published on
I was looking to stream to twitch.tv from Linux, but none of the existing solutions were embedding the webcam over the captured desktop. Since twitch.tv works with rtmp, and existing scripts were using ffmpeg, it was easy to modify the script to add the camera as an overlay. Here’s the source for anyone interested: #!/bin/bash API_KEY="live_..." FPS="30" INRES="1920x1200" OUTRES="640x400" ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0 \ -f alsa -ac 2 -i default -vcodec libx264 -s "$OUTRES" \ -acodec libmp3lame -ab 128k -ar 44100 -threads 0 \ -vf "movie=/dev/video0:f=video4linux2, scale=120:-1, setpts=PTS-STARTPTS [movie];[in] setpts=PTS-STARTPTS, [movie] overlay=main_w-overlay_w:main_h-overlay_h [out]" \ -f flv "rtmp://live. Read More...