All posts by kortsi
Setting Vim whitespace preferences by filetype
Guide to CSS support in email
How to install the latest node.js on Ubuntu
How to install the latest node.js on Ubuntu?
1 2 3 4 5 |
sudo apt-get install python-software-properties sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get remove nodejs nodejs-dev npm sudo apt-get install nodejs |
ExtJs 4: How To Add Grid Cell Tooltip
Converting multiple images into one PDF on Linux
SMB and BackupPC on Ubuntu 12.04
Smbclient which works with BackupPC on Ubuntu 12.04:
Linux IPv6 Router: RADVD + DHCPv6
Unlike IPv4, which uses DHCP for configuration, IPv6 uses the Neighbor Discovery Protocol to configure addresses and gateways. Unfortunately, originally the protocol had no means of providing addresses of DNS servers to clients, making it necessary to use DHCPv6 for that purpose. Modern Linux and Mac OS X machines are able to use the IPv6 Router Advertisement Options for DNS Configuration (RFC 6106), but to my knowledge, Windows clients are not able at the moment. Here’s how to configure a Linux router using radvd and the ISC DHCP daemon. Continue reading Linux IPv6 Router: RADVD + DHCPv6
Python 2.7 Windows Installation Checklist
Installing Python on Windows is a bit more laborious than on Mac or Linux, because there’s a bit of manual configuring to do. Here’s an installation checklist to go through to get it done so that you have IPython ready, and you can install packages from PyPI. These instructions are for Python 2.7. Continue reading Python 2.7 Windows Installation Checklist
PostgreSQL Database Cluster Migration Notes
I had to migrate a pretty big database cluster from one server with PostgreSQL 8.4 to a new server with 9.2 There we multiple apps using the databases, and the downtime had to be minimal. Luckily, the databases were split to multiple schemas, and there were only a few tables in a couple of schemas that were in active use at the time of the migration.
The pg_dump tool was very helpful in this operation. First, I set up ssh public key authentication between the postgres users from the source to the destination server. Then I ran the first full cluster dump to the new empty cluster. This can be done while users are actively using the source database, as long as you know which schemas, tables and sequences are in use, so that they can be copied again after shutting down applications: Continue reading PostgreSQL Database Cluster Migration Notes
Sonera CStream Messaging Web Service API with Python and SUDS
In this article I will show you how to use the Sonera CStream Messaging Web Service API to send an SMS using Python, and a library called SUDS. The CStream API is two-way service for both sending and receiving messages. You obviously need to pay for the service to get access. After you have your credentials, you can start using the service.
The SUDS is a lightweight SOAP Python client for exploring and using web services. A recent version can be installed on Debian based distros with “sudo apt-get install python-suds”, or on almost anything with “pip install suds”. Continue reading Sonera CStream Messaging Web Service API with Python and SUDS
Extracting META information from PostgreSQL
Excellent article on how to extract almost any piece of metadata from PostgreSQL: Extracting META information from PostgreSQL
Init Script for Daemonizing Non-Forking Processes
Sometimes you have an executable which does not fork to the background, but you need to control it with init scripts, so that it does indeed run in the background. Here’s a pretty generic init script for that. It allows you to configure these:
1 2 3 4 5 6 7 |
DAEMON_NAME="My Little Daemon" DAEMON_EXECUTABLE="/opt/my_daemon/my_daemon" DAEMON_OPTIONS="" DAEMON_HOMEDIR="/opt/my_daemon" DAEMON_PIDFILE="/var/run/my_daemon.pid" DAEMON_LOGFILE="/var/log/my_daemon.log" INIT_SLEEPTIME="2" |
Continue reading Init Script for Daemonizing Non-Forking Processes