RSSAmplifier

Blog

Bahut

Trucs à garder, que je ne sais où mettre... Stuff I want to keep, but don't know where to put

bahut.alma.chRSS feed ↗25 posts

Latest posts

Procès pour un mots-croisés

Un jour de novembre 2023, Le Nouvelliste a publié un amusant mots-croisés d'un artiste dans sa rubrique Culture. Parmi toutes les cibles de ses définitions mordantes, c'est l'UDC qui a décidé que ce mots-croisés devrait être plus connu et plus largement diffusé, et a donc attaqué l'artiste en justice. (Ou alors l'UDC n'a peut-être jamais entendu parler de l'effet Streisand ?) Alors pour ceux qui,…

Converting Ami Pro .SAM files to .doc or .txt

Ami Pro was by far the best word processor of it's time. That was the time of Windows 3.1, and later Windows 95. It was bought by Lotus, and instead of being developed into the word processor I wish I would have now, it eventually disappeared... Nowadays, there is no easy way to get to the content of these old .sam files. The files are just plain ASCII text (except when they have embedded bitmap…

Postgresql upgrade on CentOS

Our CentOS 7.5 machine had PostgreSQL version 9.2.24. But the machine doing nightly backups had Debian 9, and PostgreSQL 9.6.10. This turned out to be a problem. pg_restore 9.2 cannot restore backups which were made by 9.6, giving this cryptic error: pg_restore: [archiver] unsupported version (1.13) in file header So the better long-term solution seemed to be to upgrade PostgreSQL on CentOS. The…

Mobile skin and plugin for Roundcube webmail

The " Melanie2 " mobile skin and plugin seems to make Roundcube work on phones. And it is easier to install than it would seem when only briefly looking at the github instructions. These are the commands I needed on a Debian 10 ("Buster") machine where roundcube 1.3.10 was installed. (the base install was done from the Debian repositories: apt install roundcube roundcube-sqlite3 . Instead of…

VNC server for Cinnamon with systemd

This is what I did to enable a VNC server on CentOS 7.5, with the Cinnamon desktop. (The desktop is configured to automatically login at boot.) yum install x11vnc # or on Debian-based systems: # apt install x11vnc Create the file /etc/systemd/system/x11vnc.service : [Unit]Description=VNC Server for X11 Requires=display-manager.service [Service] ExecStart=/usr/bin/x11vnc -display :0 -rfbauth…

Cartes d'identité et passeports suisses

Une rumeur circule parmi les enfants des écoles en Suisse. Elle dit que le chiffre à la fin du numéro de la carte d'identité indique le nombre de sosies. Et celà serait utile pour les caméras de surveillance et leurs logiciels de reconnaissance faciale. C'est évidemment absurde, mais le phénomène est tout de même intéressant d'un point de vue sociologique et politique, puisqu'il reflète une…

Hard drive partitions and file system essentials v2

What most normal users need to know about hard disk partitions and filesystems to be able to move hard disks between various operating systems like Mac or Windows. Partitions Hard disks contain 1 or more partitions. To the user, each partition appears as if it were a separate hard disk. (In Windows, each partition receives a separate drive letter like C:, D:, etc.; on a Mac and most Linux, you see…

Firefox 43 crashes. Install previous version in Ubuntu

Since Firefox was upgraded to version 43 on my Ubuntu 12.04 LTS machine, it "reliably" crashed on some pages. The easiest example being youtube.com, but many other pages also. After trying many things which didn't work (disabling all extensions, all plugins, creating a fresh new profile), I decided to downgrade Firefox to the previous version. But the previous version is hard to find! The normal…

Roundcube webmail with SQLite on Debian

Roundcube is not available through apt-get in Debian 8 (Jessie), and the version which is in Debian 7 (Wheezy) is outdated. However, installing directly from the source is very easy. I used SQLite, because these servers will only occasionally serve a few users for single domains. So a full database server seemed overkill. I selected /opt/roundcube as my install dir. rcdir=/opt/roundcube mkdir…

Using curl to test Qnap NAS for Shellshock

The following briefly appeared in a Qnap forum, but was apparently quickly removed. Since I feel it's a useful test, here it is: Fun Shellshock test with curl Testing your NAS for the Shellshock vulnerability with curl: NAS_IP=192.168.1.XXX # Use the IP or the name of your NAS URL=http://$NAS_IP:8080/cgi-bin/index.cgi curl -A "() { :; }; echo Content-Type: text/plain; echo; echo; cat /etc/shadow"…

Bootcamp adventures

I needed to replace a drive in a Mac mini with a bigger one. The drive had Mac OS X 10.9 (Mavericks) and Bootcamp with Windows 7. After using Clonezilla to backup the drive and restore it to the bigger one, the partitions were obviously still the same size. There was just a lot of free unpartitioned space at the end of the new drive. How to resize and move all the partitions (including the hidden…

ffmpeg burnt-in timecode

Burning-in timecode is easy in Avid or Final Cut, but if for any reason you need to do it the hard way with command-line ffmpeg, here is how. To not make it harder than necessary, there are links to pre-compiled versions of ffmpeg on their download page . For Mac OS X, as of August 2013, there were these 2 versions: http://ffmpegmac.net , which unfortunately didn't have the needed filter. It would…

Windows 7 profile trouble

Event ID 1511: Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off. Or Event ID 1521: Windows cannot locate the server copy of your roaming profile and is attempting to log you on with your local profile. Changes to the profile will not be copied to the server when you log off. This error may be caused…

Mediawiki with Postgres on Debian

A short guide to install Mediawiki on Debian with PostgreSQL 9.1.With a fix for this error: "Attempting to connect to database "postgres" as superuser "postgres"... error: No database connection" Installing packages The server is still using Debian Squeeze, but I expect it would quite the same for the new Debian Wheezy. Here I used squeeze-backports. Add the backports repository if needed: echo…

rsync server daemon on Mac OS X with launchctl

( Update : Added the --no-detach option to the rsync command. Newer MacOS versions wouldn't start the daemon without it. With the added argument, it now works again in Sierra.) There are many web pages describing how to enable the rsync daemon on Mac OS X using launchd/launchctl mechanism. But I had to use a different (and simpler) plist file in LaunchDaemons to make it work across reboots on Lion…

scripting disk partitionning in Linux - take 2

It is possible to use parted to script/automate disk partitioning in Linux, as described in " Command-line partitioning and formatting ". Another way is to use sgdisk from the GPT fdisk programs. In Debian and derivatives, it can be installed with sudo apt-get install gdisk . The current version 0.8.1 from the Ubuntu 12.04 repository would partition only the first 2TB of a 4 TB. disk. So you may…

Set up your own Dynamic DNS

The problem with external dynamic DNS services like dyndns.org, no-ip.com, etc. is that you constantly have to look after them. Either they are free, but they expire after 1 month and you have to go to their web site to re-activate your account. Or you pay for them, but then you need to take care of the payments, update the credit card info, etc. This is all much too cumbersome for something that…

USB OSX installer for the impatient

To make a bootable USB disk with the Mac OS X installer, the guides I found are much too verbose for my taste, and have too many cute screenshots and ads. Here is a summary for the impatient. For Mavericks, Yosemite, El Capitan, Sierra There is a handy "createinstallmedia" command. The only difficulty is getting the installer, which must be downloaded from the App store. If you need an older…

Microsoft Security Essentials trouble

Update: Over 2 years later (August 2014), I still come across this problem. This time, the error code was 0x8004ff19, but the solution was the same: delete "%PROGRAMFILES%\Microsoft Security Client" and re-install with the current installer . It seems that there is a pretty bad problem with Microsoft Security Essentials. I was surprised to notice that it wasn't running on several machines. It…

WPKG client in Windows 7

Wpkg is a fantastic tool to manage software installs on groups of Windows machines without a Windows server with Active Directory. However, I had a few problems with it in Windows 7. These were solved by replacing the Wpkg Client with Wpkg-GP . By default, the Wpkg service runs at startup and does it's installs in the background. But very often, it failed for some reason to get a connection to the…

NAT over OpenVPN tunnel

Quick NAT to use an existing VPN tunnel in Linux for an additional machine (Windows XP) on your LAN. My Ubuntu notebook uses OpenVPN to access some other networks. It is also a host to various virtual machines. I wanted a Windows XP virtual machine to access resources on the remote network through my VPN tunnel. The virtual machine uses "bridged" networking, so it has a separate IP on the LAN. So…

Importing root certificates into Firefox and Thunderbird

Update Feb. 2012: see at the end for an alternative for new profiles. This is ridiculously complicated and makes me wonder whether I should just drop Firefox in Windows and go back to IE. The problem: How to automatically pre-import your self-signed certification authority into all user profiles for Firefox and Thunderbird. The solution: You need the Mozilla certutil utility (not the Microsoft…

Postgresql 8.4 LDAP unknown authentication

The syntax to specify LDAP authentication in pg_hba.conf seems to have changed between version 8.3 and 8.4. At least in Debian Squeeze, where I have both installed. For 8.3, I had a line like this in pg_hba.conf: host all all 192.168.44.0/24 ldap "ldap://localhost/dc=mydomain,dc=lan;uid=;,ou=People,dc=mydomain,dc=lan" When trying to start 8.4 with the same line, I was getting #…

Etch to Lenny trouble with libxml2

While upgrading a few Debian Etch systems to Lenny, I had a lot of trouble which showed up like this: symbol lookup error: /usr/lib/libxml2.so.2: undefined symbol: gzopen64 The real cause seems to have been that I had 2 libz libraries installed: # /sbin/ldconfig -pNX | grep libz libz.so.1 (libc6) => /lib/libz.so.1 libz.so.1 (libc6) => /usr/lib/libz.so.1 So the solution was quite simple: # rm…

Command-line partitioning and formatting

Automatic non-interactive formatting in Linux is possible with parted. The following creates 1 single ext3 partition on an entire disk. Of course, if you assign the wrong disk to the $disk variable, it will be a bad day... # Select the disk device and chose a label for the partition # ptype=msdos for disks up to 2 TB. ptype=gpt for disks over 2 TB disk=/dev/sdx; label=my_part_label; ptype=msdos I…