Archives de catégorie : code

Futilities…

Resolve GIT merge conflicts on binary files

To resolve conflits on binary files, you can checkout the remote version and your version with the `–theirs’ and `–ours’ checkout flags. This allows you to inspect both version, then write back the correct resulting file. $ git checkout –theirs … Continuer la lecture

Publié dans code | Laisser un commentaire

Sharing a single Redmine code across multiple virtual hosts

Here is a quick walkthrough on setting up a single RedMine code to serve multiple vhosts/clients with their own database. By default all uploaded files would be stored in the same `files’ subdir, so to have proper file upload isolation across the … Continuer la lecture

Publié dans code | Laisser un commentaire

Pre-fetch packages for Debian dist-upgrade

Recently, I had to upgrade a Debian 4 (Etch) to Debian 5 (Lenny) at a client facility connected to Internet with a « slow » 2Mbps SDSL link. The problem is that downloading the packages while doing the upgrade on-site, during working … Continuer la lecture

Publié dans code | Laisser un commentaire

Re: Hackers bypass .htaccess security by using GETS rather than GET

http://cd34.com/blog/web-security/hackers-bypass-htaccess-security-by-using-gets-rather-than-get/ After reading this article I immediately checked my application and found that it was subject to this issue. I started worrying and testing out how to mitigate this issue and protect my application. However, after calming down, I started looking for … Continuer la lecture

Publié dans code | Commentaires fermés sur Re: Hackers bypass .htaccess security by using GETS rather than GET

flock in bash script

util-linux(-ng) flock On Linux systems, there is a `flock’ command (from `util-linux’ or `util-linux-ng’) that can be used to run a command inside a file lock/unlock block. function run_lock_flock { LOCK=$1 shift touch « $LOCK » flock « $LOCK » « $@ » } portable way … Continuer la lecture

Publié dans code | Commentaires fermés sur flock in bash script

Postgresql 9.0 Hot-Standby and Streaming-Replication Overview [fr]

Link: Postgresql 9.0 Hot-Standby and Streaming-Replication Overview [fr] Un petit mémo suite à des tests de mise en œuvre du hot-standby et streaming-replication de PostgreSQL 9.0.

Publié dans code, link, network | Commentaires fermés sur Postgresql 9.0 Hot-Standby and Streaming-Replication Overview [fr]