Script to replace string with sed
Here is a short script to replace strings with sed easily written in bash. #!/bin/bash #Replace string in file of given extension #argument 1, extension type #argument 2, old string #argument 3, new...
View ArticleSearch a string in selected files
Here is a short script/memo to find strings inside given file. The script is assumed to be called strfind. It is written in bash. Here is the spec of this script. michael@boheme:~/bin $ strfind ?...
View ArticleSolve key-input issues with minecraft on Linux
When trying to launch Minecraft, you may notice that the key-input is not working properly, leading to a character that cannot move but only interact with blocks around him. This issue is related to...
View ArticleSetup and manipulation of a Postgres-XC cluster with node DDL
If you came at this page, it means that you got interest in a cluster solution based on PostgreSQL. Currently developed for version 0.9.7, Postgres-XC has been largely improved with the way cluster is...
View ArticleControl dump file name in Linux
Modifying the format name of dump file in a Linux system can be made with sysctl like this. sysctl -w kernel.core_pattern=core.%e.%p However, making this modification command-based will not make it...
View ArticleClean up dos files with emacs
When creating files in Windows, those files will have the DOS format. This creates annoying ^M characters at the end of lines, which can be seen in patches or diff files. In order to localize them, use...
View ArticleSplit an image file into tiles
With ImageMagick package (image manipulation library) installed on a Linux machine, it is possible to split a huge image file into smaller tiles with such kind of command: convert -crop $WIDTHx$HEIGHT@...
View ArticleMigration to ArchLinux
In one word, Arch Linux is AWESOME. It is the first distribution of Linux that I use giving me the feeling that I control everything in my environment. Among its strengths, its package manager pacman...
View ArticlePostgres settings: simple syslog configuration with syslog-ng
Setting up logging for a PostgreSQL server using syslog on a Linux machine is intuitive especially with logging systems like syslog-ng, you just need to put the correct parameters at the right place....
View ArticleTuning disks and Linux for Postgres
Tuning the OS on which is running a database server is important to get good performance for an application. There are many tricks to know when tuning a system, being generally dependent on the...
View Article