The correct way to copy data is not to extract to a CSV and import with some tool, to manually create INSERT queries, or to try filtering the pg_dump output. You should use the COPY function included in postgres, as such: psql -c “COPY (SELECT * FROM my_table WHERE created_at > ‘2012-05-01’) TO STDOUT;” source_db […]
I’ve found these useful during development: Listing running queries: SELECT pid, now() – pg_stat_activity.query_start AS duration, query FROM pg_stat_activity WHERE state = ‘active’ AND pid <> pg_backend_pid(); Listing queries that have run for more than a full minute: SELECT pid, now() – pg_stat_activity.query_start AS duration, query FROM pg_stat_activity WHERE state = ‘active’ AND pid <> […]
I wanted some GLaDOS-like sounds for my home automation system. I found this project, which doesn’t work anymore as of writing, as the synthesis server is offline. Thus, my weekend project turned into a week-long evening project. But that’s fine, as the result is cool: The new GLaDOS Voice Generator is here! Enjoy.
To enable timing of your query: SET STATISTICS TIME ON Time statistics provides output like this in the “Messages” tab of SSMS after running a query: (127 row(s) affected) SQL Server Execution Times: CPU time = 0 ms, elapsed time = 42 ms. To show IO statistics: SET STATISTICS IO ON ..which provides stuff […]
So, you need the private key for a certificate on Windows, for some innocent snooping around with Wireshark, but someone marked it as not exportable. Now what? Cue Gentil Kiwi and his tool Mimikatz. For future reference for myself, I’ve archived a copy of the source here, and the binaries here. The following commands will […]
From the manual: This must be done through the host software which takes control of the Z-Stick USB adapter while the Z-Stick is in SerialAPI-Mode. If you have the Danfoss ZWave PC Controller, previously available here, you can use the “Reset Controller” button to do so. This works fine in VMware Player too, so you […]
ghacks.net has an excellent article on how to do this. I archived it here.
While I’m not sure why you’d want to do so, compiling batch files into executables just has some hackerish appeal to me. The batch file compiler does so, and includes a cool syntax highlighting editor as well! Get it here: http://www.bdargo.com/ bfcpe.exe
This is an actual software autoupdater which is free, donate-ware and doesn’t contain malware! In short: awesome! Get it from: http://www.patchmypc.net/ PatchMyPC.exe
Slow MP3 allows you to speed up and down MP3 files without getting “chipmunk” voices, transpose them up and down and other cool stuff. It’s awesome if you’re trying to learn that new song on your guitar and can’t find the tabs for it. Try it out! http://www.finki.net/pekka/slowmp3/ (now dead – see my copy below) […]