Tag: AI Agents
When the Assistant Becomes the Attacker: Hidden Risks of Tool-Enabled LLMs
Tag: AI Alignment
When the Assistant Becomes the Attacker: Hidden Risks of Tool-Enabled LLMs
Tag: AI Security
When the Assistant Becomes the Attacker: Hidden Risks of Tool-Enabled LLMs
Tag: LLMs
When the Assistant Becomes the Attacker: Hidden Risks of Tool-Enabled LLMs
Tag: MCP
When the Assistant Becomes the Attacker: Hidden Risks of Tool-Enabled LLMs
Tag: AGI
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Large Language Models (LLMs), like ChatGPT, power many of the AI tools we use today. These models are trained on vast amounts of text data and predict the most likely next word in a sentence based on context. At their core, LLMs break down text into tokens, the building blocks of language processing. A token might be a word, part of a word, or even a single character. By analyzing patterns in sequences of tokens, LLMs generate the text we see.
Tag: AI
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Large Language Models (LLMs), like ChatGPT, power many of the AI tools we use today. These models are trained on vast amounts of text data and predict the most likely next word in a sentence based on context. At their core, LLMs break down text into tokens, the building blocks of language processing. A token might be a word, part of a word, or even a single character. By analyzing patterns in sequences of tokens, LLMs generate the text we see.
Tag: ChatGPT
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Large Language Models (LLMs), like ChatGPT, power many of the AI tools we use today. These models are trained on vast amounts of text data and predict the most likely next word in a sentence based on context. At their core, LLMs break down text into tokens, the building blocks of language processing. A token might be a word, part of a word, or even a single character. By analyzing patterns in sequences of tokens, LLMs generate the text we see.
Tag: GPT
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Large Language Models (LLMs), like ChatGPT, power many of the AI tools we use today. These models are trained on vast amounts of text data and predict the most likely next word in a sentence based on context. At their core, LLMs break down text into tokens, the building blocks of language processing. A token might be a word, part of a word, or even a single character. By analyzing patterns in sequences of tokens, LLMs generate the text we see.
Tag: LLM
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Understanding Large Language Models: Tokens, Limits, and the Path to AGI
Large Language Models (LLMs), like ChatGPT, power many of the AI tools we use today. These models are trained on vast amounts of text data and predict the most likely next word in a sentence based on context. At their core, LLMs break down text into tokens, the building blocks of language processing. A token might be a word, part of a word, or even a single character. By analyzing patterns in sequences of tokens, LLMs generate the text we see.
Tag: Bitcoin
Bitcoin in El Salvador: A Missed Opportunity?
El Salvador’s Bitcoin Experiment: A Missed Opportunity?
In 2021, El Salvador made history as the first country in the world to adopt Bitcoin as legal tender. President Nayib Bukele touted the move as a bold step towards financial inclusion, attracting foreign investment, and reducing reliance on traditional financial systems. The initiative included the rollout of a government-backed Bitcoin wallet, Chivo, which came preloaded with $30 worth of Bitcoin for citizens to kickstart adoption. On paper, it was a groundbreaking experiment with the potential to transform the nation’s economy and empower its people. But the reality of the implementation tells a different story.
Fedora 20 Linux + bitcoind : Setting up firewalld for running a full bitcoin node
If you feel like running a full bitcoin node on your Fedora Linux server (and it’s a great way to help the bitcoin network if you have spare capacity / bandwidth), you’ll need to update the firewalld rules in order to allow foreign nodes to connect to yours.
Here’s how…
Tag: Crypto
Bitcoin in El Salvador: A Missed Opportunity?
El Salvador’s Bitcoin Experiment: A Missed Opportunity?
In 2021, El Salvador made history as the first country in the world to adopt Bitcoin as legal tender. President Nayib Bukele touted the move as a bold step towards financial inclusion, attracting foreign investment, and reducing reliance on traditional financial systems. The initiative included the rollout of a government-backed Bitcoin wallet, Chivo, which came preloaded with $30 worth of Bitcoin for citizens to kickstart adoption. On paper, it was a groundbreaking experiment with the potential to transform the nation’s economy and empower its people. But the reality of the implementation tells a different story.
Tag: Cryptocurrencies
Bitcoin in El Salvador: A Missed Opportunity?
El Salvador’s Bitcoin Experiment: A Missed Opportunity?
In 2021, El Salvador made history as the first country in the world to adopt Bitcoin as legal tender. President Nayib Bukele touted the move as a bold step towards financial inclusion, attracting foreign investment, and reducing reliance on traditional financial systems. The initiative included the rollout of a government-backed Bitcoin wallet, Chivo, which came preloaded with $30 worth of Bitcoin for citizens to kickstart adoption. On paper, it was a groundbreaking experiment with the potential to transform the nation’s economy and empower its people. But the reality of the implementation tells a different story.
Tag: El Salvador
Bitcoin in El Salvador: A Missed Opportunity?
El Salvador’s Bitcoin Experiment: A Missed Opportunity?
In 2021, El Salvador made history as the first country in the world to adopt Bitcoin as legal tender. President Nayib Bukele touted the move as a bold step towards financial inclusion, attracting foreign investment, and reducing reliance on traditional financial systems. The initiative included the rollout of a government-backed Bitcoin wallet, Chivo, which came preloaded with $30 worth of Bitcoin for citizens to kickstart adoption. On paper, it was a groundbreaking experiment with the potential to transform the nation’s economy and empower its people. But the reality of the implementation tells a different story.
Tag: Hybris
SAP Hybris platform sizing guidelines
Hybris is a very widely used platform for eCommerce. It is a somewhat complex piece of software, with multiple interacting components.
When trying to obtain optimal performance, there are a few guidelines you’ll need to follow. We’ll review them in this post.
Tag: Sap
SAP Hybris platform sizing guidelines
Hybris is a very widely used platform for eCommerce. It is a somewhat complex piece of software, with multiple interacting components.
When trying to obtain optimal performance, there are a few guidelines you’ll need to follow. We’ll review them in this post.
Tag: 4hww
Tim Ferriss Show – The Random Show, Ice Cold Edition – Show notes
Those are my notes regarding the podcast episode “The Random Show, Ice Cold Edition” of the Tim Ferriss Show.
Tag: Shownotes
Tim Ferriss Show – The Random Show, Ice Cold Edition – Show notes
Those are my notes regarding the podcast episode “The Random Show, Ice Cold Edition” of the Tim Ferriss Show.
Tag: TimFerriss
Tim Ferriss Show – The Random Show, Ice Cold Edition – Show notes
Those are my notes regarding the podcast episode “The Random Show, Ice Cold Edition” of the Tim Ferriss Show.
Tag: Stoicism
Hopes
We must invest our hopes not in the things that happen, but in our capacities to face them as human beings
— Keith Seddon
Tag: Centos
Linux RedHat / CentOS / Fedora : Uninstall a package along with dependencies
If you’ve been wondering how to delete a package you mistakenly installed (or which is no longer needed) along with all its dependencies, here’s a neat way to achieve just that.
The idea is that whenever you use yum to perform some operation on packages, a transaction is created. If you installed a package along with its dependencies, then you can undo just that by undoing that transaction.
Tag: Fedora
Linux RedHat / CentOS / Fedora : Uninstall a package along with dependencies
If you’ve been wondering how to delete a package you mistakenly installed (or which is no longer needed) along with all its dependencies, here’s a neat way to achieve just that.
The idea is that whenever you use yum to perform some operation on packages, a transaction is created. If you installed a package along with its dependencies, then you can undo just that by undoing that transaction.
Fedora 20 Linux + bitcoind : Setting up firewalld for running a full bitcoin node
If you feel like running a full bitcoin node on your Fedora Linux server (and it’s a great way to help the bitcoin network if you have spare capacity / bandwidth), you’ll need to update the firewalld rules in order to allow foreign nodes to connect to yours.
Here’s how…
Tag: Linux
Linux RedHat / CentOS / Fedora : Uninstall a package along with dependencies
If you’ve been wondering how to delete a package you mistakenly installed (or which is no longer needed) along with all its dependencies, here’s a neat way to achieve just that.
The idea is that whenever you use yum to perform some operation on packages, a transaction is created. If you installed a package along with its dependencies, then you can undo just that by undoing that transaction.
Fedora 20 Linux + bitcoind : Setting up firewalld for running a full bitcoin node
If you feel like running a full bitcoin node on your Fedora Linux server (and it’s a great way to help the bitcoin network if you have spare capacity / bandwidth), you’ll need to update the firewalld rules in order to allow foreign nodes to connect to yours.
Here’s how…
Docker 101 : Creating an Elasticsearch image
Creating an image in Docker is rather easy and well documented.
You start by editing a file which describes the image, then run a few commands, and voilà .
In this post we’ll cover how to create a very basic Docker image which will let us spawn elasticsearch instances very easily.
Linux : Encrypted LVM quick and easy howto
The goal of this tutorial is to show you how to create an encrypted LVM on Linux. This will help you keep your data safe in the event of, for example, your laptop computer being stolen.
Unix 101 : Shell wildcards expansion, to quote or not to quote
Or why you usually use ls -l *txt without quotes, but use quotes in find . -name “*txt”.
Getting Spotify to run on Gentoo/Linux: A Gross and Cruel Hack
Spotify is a great way to listen to music. Unfortunately the official client only runs on Windows and Mac machines. There is an experimental unsupported client for linux, however it’s provided as a DEB (ubuntu/debian) package.
Here’s a gross hack for whom is desperate to get it working on Gentoo.
Unix 101 : Showing non-printing characters in text files (ex : DOS files)
A non-printing character is a character which won’t actually get directly printed (or displayed) but rather interpreted. Such non-printing characters are for example line-feed or tabulation. The interpretation of those characters can differ from one system to the next. For example the line-feed character is different on Unix or DOS.
If you need an easy way to confirm that a text file is DOS or UNIX formatted (they differ with respect to the end of line character(s) for example) or if you wish to display normally non-printing characters of a text file, you can use the -vET command line switches of the cat utility.
As explained in the man page :
- -v : will use the ^ and M- notation for control and multibytes characters
- -E : will make ends of lines visible
- -T : will make tabulations visible
For example :
Linux + Xorg : Remapping caps lock key to escape
In this post I’ll revisit the classical “how to remap caps lock into something useful” once again. In this post, I’ll show how to remap the caps lock key to have an extra Escape key, which is very useful for all VI/Vim users.
Gentoo + OpenVPN : getting things started in the correct order
I’m running an OpenVPN server, configured in bridging mode.
I had quite a bit of trouble getting OpenVPN to start after networking is up, but before the the bridge is setup so that the tap0 device, which is created by OpenVPN can be added to the bridge.
The solution is simpler : let the tap0 be automatically created and added to the bridge by Gentoo Linux, then start OpenVPN with a config file instructing to use the already created tap0 device.
This post shows the configuration snippets to get things started in the right order on Gentoo.
Perl : Counting occurences of IP addresses in Apache logs
This Perl one-liner is intended to print the 10 most frequent client IP addresses in an Apache log file. It can easily be recycled to count anything, though.
Linux / Unix : Disk usage and identifying biggest files
When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
Gentoo Linux / Portage : How to know which package provided an installed file
If there’s a file installed on your disk for which you’d like to know what package provided it, you can use the equery command like below :
Gentoo : Xorg X Server 3D hardware acceleration
You need to have read/write permissions to /dev/dri/cardX to benefit from 3D hardware acceleration in Xorg X Server. On a Gentoo linux machine, this file has the following permissions set by default :
ls -l /dev/dri/card0
crw-rw---- 1 root video 226, 0 2009-10-14 16:12 /dev/dri/card0
Gentoo : Running Cacti with LigHTTPD
If you use Gentoo and tried to install Cacti with Lighttpd instead of Apache, chances are that you ran into this error message :
/usr/lib/python2.6/site-packages/WebappConfig/content.py:27: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5, re, os, os.path
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=www-servers/apache-1.3" or correct your settings.
* Fatal error(s) - aborting
HAL + Xorg X server : Using HAL to set hardware specific configurations for Xorg Xserver
The Xorg X Server can now rely on HAL to get information about the hardware the machine is running. This allows the X Server to auto-configure most of its components such as keyboard / mouse / screen / graphic adapter. But there is still room for tweaking it if needed.
This post explains how to configure extra properties for a keyboard at the HAL level, so that X Server will correctly auto-configure it for you.
rTorrent : Probing downloads status through XML-RPC
rTorrent is a very efficient BitTorrent client for linux. It has a very small memory footprint, a very customizable configuration file, and exposes it’s internals through XML-RPC. This is convenient to implement 3rd party GUI or web interfaces.
Let’s see how to setup and use XML-RPC to probe rTorrent downloads.
VIM: using the modeline for file based customized editing parameters
The “modeline” is a common way to set (or override) VIM settings on a file by file basis. Let’s see a few of the key concepts of the VIM modeline.
Linux : SATA hot plug / unplug
I have 3 hard disks in SATA-to-eSATA external enclosure which I occasionally need to plug to perform backups and to unplug when done. I found it annoying to have to restart the whole computer at every turn, especially when SATA is supposed to bring hotplug abilities. If you mainboard / SATA chipset and disks support hot plugging and unplugging, you can do this by following those instructions.
SSH : Multiplexing connections
There is a feature in OpenSSH since v3.9 which allows multiple SSH connections with the same caracteristics (host, port, remote login) to be made through a single TCP connection. This is useful because you’ll have to authenticate only once, and besides the new SSH connections will be much faster to establish.
Linux : Configuring a network bridge for your Virtual Machines
My new center of interest those days being virtualization, I tried quite a few software starting with Xen, then QEMU, then KVM, and finally VirtualBox. But as far as giving a network access to the VM is concerned, I’ve always sticked to a network bridge for the reason that this makes the VM appear on the network just like any other computer of your network.
This post provided a sample script to setup a bridge suitable to use with all of the named virtualization softwares.
D-Bus introduction in Perl
As stated in Wikipedia :
D-Bus (Desktop Bus) is a simple inter-process communication (IPC) system for software applications to communicate with one another.
This post provides a simple code snippet in Perl to help you getting started with D-Bus programming.
Xen : OpenSolaris 2008.11 DomU running on a Linux Dom0
This post is a step by step explanation about how to get an OpenSolaris 2008.11 run as a Xen DomU on a Linux Dom0.
To follow this, you’ll need a Linux machine ready for Xen (I run Xen 3.3.0), with vncviewer installed.
This post doesn’t explain the basics of Xen, so you might want to start by learning Xen if you don’t already know a bit of it.
shell tip : identify broken symlinks
If you need to identify broken symlinks, you can do the following :
find -L . -type l
The -L options instructs find to follow symlinks when possible. Hence no “working symlink” will ever get returned as the targets won’t match -type l (meaning “file is a symlink”).
On the other hand, find will not be able to follow broken symlinks, so the information will be taken from the symlink itself and not from the non-existent or otherwise unreachable target. The -type l will then be a match and the broken symlink filename will be returned.
Gentoo : Managing software packages
In this post I’ll cover the basics one needs to know to install, upgrade and remove packages on a Gentoo linux system.
Gentoo : First thoughts after the switch
I’ve recently switched to the Gentoo Linux distribution (mostly to experiment with this Linux distro) and I don’t regret it so far. This post is about my first impressions about Gentoo.
Ubuntu 8.04.1 : Xen 3.2 package broken ?
I’m trying to install xen on Ubuntu 8.04.1 and here is what I get :
spaghetti% sudo apt-get install ubuntu-xen-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ubuntu-xen-server: Depends: python-xen-3.2 but it is not going to be installed
Depends: xen-utils-3.2 but it is not going to be installed
E: Broken packages
spaghetti%
I’ve tried to follow the package dependencies but without success. As for now I’m growing tired of Ubuntu and I’m considering moving away to a more robust distribution … I’d be glad to hear your point of view about that too.
Linux : find out the kernel command line
If you have multiple linux kernels with differents options in the command line in your bootloader (grub, lilo or other) and you wonder which one was used to boot, you can find out by looking in /proc/cmdline. Ex :
[root@picolo:~]# cat /proc/cmdline<br /> ro root=LABEL=/<br /> [root@picolo:~]#
NFS : see what’s exported from an NFS server
To know what directories are exported by a NFS server, you can use the showmount -e nfs_server from a NFS client.
[root@client:~]# showmount -e server<br /> Export list for server:<br /> /data/dir1 (everyone)<br /> /data/dir2 client1 client2 client3
(The /data/dir2 is exported only to specified clients)
Backups : a personnal implementation
If you’ve been following my blog for a while, you might have seen posts about SSH, RSYNC, ZFS Snapshots and so on. This article aims at describing the big picture, and to explain how I’ve been using those tools and technologies to build my own home backup system.
Securing automated rsync over SSH
Quoting the RSYNC homepage : “rsync is an open source utility that provides fast incremental file transfer.”
To make rsync both secure and automated (i.e : non-interactive), you can use SSH as the transport and set up a key pair. This is what will be discussed in this post, along with a few improvements.
SSH slow to connect to a Solaris 10 host
If you experience a slow SSH connection to a Solaris 10 host while after connection everything works fine, then read on !
Ubuntu 8.04 + IBM T40 = No sound
If you upgraded your Ubuntu on an IBM T40 Laptop only to find out that there is no sound anymore, you’re not alone in this 😉
Follow the bug report for more information !
Edit 2008-05-11 : As of today I don’t have this problem anymore … update your machine if you haven’t yet !
Edit 2008-06-22 : Sound vanished again … I really need to look into this before this drives me crazy !!
CFEngine : Checking for processes
CFEngine can do wonders to keep a cluster in shape, but it can be very useful for a single server as well. Here is a configuration sample to monitor a few common services and restart them should they fail.
Unix : shell tips
I ran into this into the following article, “Learn 10 good UNIX usage habits“. This article is mainly common sense, but there are interesting points, such as :
- avoid piping when you can, in order to save performance (the classical construct grep | wc to count the lines is useless as most versions of grep can count with grep -c)
- use awk to “grep” on a specific field of a line with “… | awk ‘$1 == “XXX”‘ which is cool and I never use
- the find | xargs construct (I’d add “find -print0 | xargs -0”, useful if your find brings back filenames with a space inside …)
All in all it is worth a reading, if only to refresh your memory.
X10 Home automation : Heyu a tool for managing a CM11
I currently manage all my X10 home automation with MisterHouse which is a fantastic tool but is a bit on the heavyweight side. Plus you need to know a bit of Perl to take full advantage of it.
If you are looking for something simpler to use, you might want to consider HEYU.
dsh : a distributed shell
A common problem when you deal with a pool of servers (clusters or server farms, you name it) is to execute the same command line on each server. It is usual to solve this with a “for” construct such as :
for i in server1 server2 ; do ssh $i "uname -a"; done
But this is basically re-inventing the wheel everytime. Here comes Distributed Shell (DSH).
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Perl : Convert time from Epoch to local time

This little Perl one-liner can get handy when you need to translate “time in seconds since the Epoch” (for example in logs) to local time :
% perl -e 'print scalar(localtime(1202484725)), "\n";'<br /> Fri Feb 8 16:32:05 2008<br /> %
This was pretty useful today when browsing through Nagios event logs, where times are given in seconds from the Epoch.
By the way, the Epoch is defined as 00:00 UTC on January, 1st, 1970.
Linux : Using loop devices (eg : mounting an ISO file)
If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso<br /> spaghetti% sudo mount /dev/loop0 /mnt<br /> spaghetti% ls /mnt<br /> Autorun.inf setup.exe setup.ico<br /> spaghetti%<br /> [...]<br /> spaghetti% sudo umount /mnt<br /> spaghetti% sudo losetup -d /dev/loop0
This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.
Perl : A module to play with a GSM mobile
As you might have read in my previous post about accessing your cell phone with the AT-commands under Linux.
If not, you might want to start there for a little context.
I finally wrote and released on CPAN a Perl module which will help to automate cell phone operations such as saving/restoring the phonebook or sending an SMS.
Examples are included in the documentation. I believe I made it easy to use, but let me know if I’m wrong 😀 .
Perl : Optimizing pattern searches with Regexp::Assemble
When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.
In order to optimize such a pattern matching, you can use the Regexp::Assemble module.
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
Unix : the “script” command
The script command is a must for any unix sysadmin.
Once invoked, it will faithfully write anything you typed as well as any output generated in your terminal into a file of your choice (defaults to “typescript”).
This is great when you want to document everything you did on a specific server, for example.
spaghetti:~$ script<br /> Script started, file is typescript<br /> spaghetti:~$<br />
When launched, you don’t see anything, but everything displayed goes to a file as well as the terminal.
sed : replacing a text in a file
To replace a text in a file, you can invoke sed as in the following example :
% cat file.txt | sed -e 's/text/replacement/g' > result.txt
This will change all the occurences of “text” to “replacement” in “file.txt” and output the result in “result.txt”
Note : As suggested by Matthias from adminlife in the comments, if you wanted to do “in place” text replacement (that is modify the file without a temporary file in between), you can do the following :
CFEngine – Installing on Debian GNU/Linux
In this post we’ll install CFEngine on a Debian system. Debian make is really simple to install any packages, so let’s follow the “standard” package installation procedure (I’ll assume that apt is correctly setup on your system ! If you have troubles with it, let me know, I’ll write a post on this topic).
CFEngine – What is it ?
CFEngine is a configuration management engine. I’m going to write a series of short posts as I’m going to use CFEngine in a current project. Let’s start with a short description of CFEngine purpose and main features.
Keeping track of changes with cfengine and SubVersioN
Cfengine is a tool which purpose is to describe what is a healthy system and how to bring it back to normal when something fails.
I won’t go into an explanation about how cfengine works, because the project webpage already has a neat tutorial and complete reference. Instead of that, I’ll explain how I used cfengine to build a fool proof Linux firewall.
Tag: Packages
Linux RedHat / CentOS / Fedora : Uninstall a package along with dependencies
If you’ve been wondering how to delete a package you mistakenly installed (or which is no longer needed) along with all its dependencies, here’s a neat way to achieve just that.
The idea is that whenever you use yum to perform some operation on packages, a transaction is created. If you installed a package along with its dependencies, then you can undo just that by undoing that transaction.
Solaris 10: On which CD is that XYZ package ?
If you want to know on which CD is a package, without :
- Mounting CD
- Searching
- Unmounting
- Swear and
- Go back to 1
Then you can :
- Mount CD #1 (mount -F hsfs /dev/dsk/
/mnt or, if you have automount cd /cdrom/cdrom0 or something like that) - Go in the Solaris_10/Product directory of the CD
- Do grep -l
.virtual_packagetoc_* which will output the .virtual_packagetoc_N where N is the number of the CD holding that package.
Exemple :
Tag: Redhat
Linux RedHat / CentOS / Fedora : Uninstall a package along with dependencies
If you’ve been wondering how to delete a package you mistakenly installed (or which is no longer needed) along with all its dependencies, here’s a neat way to achieve just that.
The idea is that whenever you use yum to perform some operation on packages, a transaction is created. If you installed a package along with its dependencies, then you can undo just that by undoing that transaction.
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: Yum
Linux RedHat / CentOS / Fedora : Uninstall a package along with dependencies
If you’ve been wondering how to delete a package you mistakenly installed (or which is no longer needed) along with all its dependencies, here’s a neat way to achieve just that.
The idea is that whenever you use yum to perform some operation on packages, a transaction is created. If you installed a package along with its dependencies, then you can undo just that by undoing that transaction.
Tag: Firewall
Fedora 20 Linux + bitcoind : Setting up firewalld for running a full bitcoin node
If you feel like running a full bitcoin node on your Fedora Linux server (and it’s a great way to help the bitcoin network if you have spare capacity / bandwidth), you’ll need to update the firewalld rules in order to allow foreign nodes to connect to yours.
Here’s how…
Tag: Docker
Docker 101 : Creating an Elasticsearch image
Creating an image in Docker is rather easy and well documented.
You start by editing a file which describes the image, then run a few commands, and voilà .
In this post we’ll cover how to create a very basic Docker image which will let us spawn elasticsearch instances very easily.
Tag: Elasticsearch
Docker 101 : Creating an Elasticsearch image
Creating an image in Docker is rather easy and well documented.
You start by editing a file which describes the image, then run a few commands, and voilà .
In this post we’ll cover how to create a very basic Docker image which will let us spawn elasticsearch instances very easily.
Tag: Events
Facebook : How to remove an event you’ve been invited to without responding
Just because I struggle every time to find how to do that, here’s the procedure to delete an event without responding :
- Click on events
- Click on the event you want to get rid of
- In the guest list you’ll see yourself as well as your invited friends. There’s a cross beside your name. Click on it to remove yourself
BAM ! DONE !
Tag: Facebook
Facebook : How to remove an event you’ve been invited to without responding
Just because I struggle every time to find how to do that, here’s the procedure to delete an event without responding :
- Click on events
- Click on the event you want to get rid of
- In the guest list you’ll see yourself as well as your invited friends. There’s a cross beside your name. Click on it to remove yourself
BAM ! DONE !
Facebook API : Exporting your friends birthdays into vCards format
The following sample Facebook desktop application exports your friends birthdays in a vCard file format. This file is suitable to be imported into your GMail contacts for example.
Tag: Cryptsetup
Linux : Encrypted LVM quick and easy howto
The goal of this tutorial is to show you how to create an encrypted LVM on Linux. This will help you keep your data safe in the event of, for example, your laptop computer being stolen.
Tag: Encryption
Linux : Encrypted LVM quick and easy howto
The goal of this tutorial is to show you how to create an encrypted LVM on Linux. This will help you keep your data safe in the event of, for example, your laptop computer being stolen.
Tag: Lvm
Linux : Encrypted LVM quick and easy howto
The goal of this tutorial is to show you how to create an encrypted LVM on Linux. This will help you keep your data safe in the event of, for example, your laptop computer being stolen.
Tag: Openbsd
OpenBSD : Read only Compact Flash installation
Here are a couple of pointers to perform an installation of OpenBSD on a media which will be read-only most of the times. I hope I didn’t forget anything otherwise I’ll be in trouble next time I reinstall… 🙂
OpenBSD : Release 4.3 is out
The twice-a-year release of OpenBSD is out today (More details on Undeadly). You can buy the CD set or get it by FTP (in this case consider donating to the project as CD sales are the main source of income to the project).
Enjoy.
VLAN + OpenBSD : a simple configuration
This posts gives a short intro about VLAN and a simple configuration sample on a DELL PowerConnect 5224 switch with an OpenBSD machine.
OpenBSD : Give money !!
not to me !! 😀
The OpenBSD project needs money to hold its events (such as hackaton, where developpers gather to implement features, or usual running costs).
If you think you don’t use OpenBSD, think again ! The project OpenSSH, which implements a free, and secure SSH implementation, comes from OpenBSD. It is widely used in many OSes and appliances …
We need OpenBSD !! Don’t hesitate to make a donation !
The original post
The OpenBSD project
The OpenSSH sister project
Tag: Command Line
Unix 101 : Shell wildcards expansion, to quote or not to quote
Or why you usually use ls -l *txt without quotes, but use quotes in find . -name “*txt”.
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
Tag: Shell
Unix 101 : Shell wildcards expansion, to quote or not to quote
Or why you usually use ls -l *txt without quotes, but use quotes in find . -name “*txt”.
Bash / zsh : Using the history expansion
One of the features of bash I’ve too long overlooked is its history expansion. In this post I’ll show a few examples to get a grip at it.
Linux / Unix : Disk usage and identifying biggest files
When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
shell tip : identify broken symlinks
If you need to identify broken symlinks, you can do the following :
find -L . -type l
The -L options instructs find to follow symlinks when possible. Hence no “working symlink” will ever get returned as the targets won’t match -type l (meaning “file is a symlink”).
On the other hand, find will not be able to follow broken symlinks, so the information will be taken from the symlink itself and not from the non-existent or otherwise unreachable target. The -type l will then be a match and the broken symlink filename will be returned.
Unix : shell tips
I ran into this into the following article, “Learn 10 good UNIX usage habits“. This article is mainly common sense, but there are interesting points, such as :
- avoid piping when you can, in order to save performance (the classical construct grep | wc to count the lines is useless as most versions of grep can count with grep -c)
- use awk to “grep” on a specific field of a line with “… | awk ‘$1 == “XXX”‘ which is cool and I never use
- the find | xargs construct (I’d add “find -print0 | xargs -0”, useful if your find brings back filenames with a space inside …)
All in all it is worth a reading, if only to refresh your memory.
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
sed : replacing a text in a file
To replace a text in a file, you can invoke sed as in the following example :
% cat file.txt | sed -e 's/text/replacement/g' > result.txt
This will change all the occurences of “text” to “replacement” in “file.txt” and output the result in “result.txt”
Note : As suggested by Matthias from adminlife in the comments, if you wanted to do “in place” text replacement (that is modify the file without a temporary file in between), you can do the following :
Tag: Unix
Unix 101 : Shell wildcards expansion, to quote or not to quote
Or why you usually use ls -l *txt without quotes, but use quotes in find . -name “*txt”.
Unix 101 : Showing non-printing characters in text files (ex : DOS files)
A non-printing character is a character which won’t actually get directly printed (or displayed) but rather interpreted. Such non-printing characters are for example line-feed or tabulation. The interpretation of those characters can differ from one system to the next. For example the line-feed character is different on Unix or DOS.
If you need an easy way to confirm that a text file is DOS or UNIX formatted (they differ with respect to the end of line character(s) for example) or if you wish to display normally non-printing characters of a text file, you can use the -vET command line switches of the cat utility.
As explained in the man page :
- -v : will use the ^ and M- notation for control and multibytes characters
- -E : will make ends of lines visible
- -T : will make tabulations visible
For example :
Unix 101 : Filesystem basics & Special files
This post is meant to clarify a few key concepts about Unix filesystems such as directory permissions, hardlinks and symlinks.
AIX : Use sar to check cpu usage
If you’re looking for CPU usage statistics and system performance on IBM AIX, sar might just be the tool your looking for. It’ll display information for 5 minutes intervals from midnight to current time. The output looks like this :
Linux / Unix : Disk usage and identifying biggest files
When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
OpenSolaris : Switching to the /dev development branch
In OpenSolaris, switching to the /dev development branch is a bit like switching to the testing branch for some linux distros. So you might want to think twice before doing so, as it might sometimes break things.
If you still want to do that, follow those instructions :
SSH : Multiplexing connections
There is a feature in OpenSSH since v3.9 which allows multiple SSH connections with the same caracteristics (host, port, remote login) to be made through a single TCP connection. This is useful because you’ll have to authenticate only once, and besides the new SSH connections will be much faster to establish.
Xen : OpenSolaris 2008.11 DomU running on a Linux Dom0
This post is a step by step explanation about how to get an OpenSolaris 2008.11 run as a Xen DomU on a Linux Dom0.
To follow this, you’ll need a Linux machine ready for Xen (I run Xen 3.3.0), with vncviewer installed.
This post doesn’t explain the basics of Xen, so you might want to start by learning Xen if you don’t already know a bit of it.
shell tip : identify broken symlinks
If you need to identify broken symlinks, you can do the following :
find -L . -type l
The -L options instructs find to follow symlinks when possible. Hence no “working symlink” will ever get returned as the targets won’t match -type l (meaning “file is a symlink”).
On the other hand, find will not be able to follow broken symlinks, so the information will be taken from the symlink itself and not from the non-existent or otherwise unreachable target. The -type l will then be a match and the broken symlink filename will be returned.
Gentoo : Managing software packages
In this post I’ll cover the basics one needs to know to install, upgrade and remove packages on a Gentoo linux system.
Gentoo : First thoughts after the switch
I’ve recently switched to the Gentoo Linux distribution (mostly to experiment with this Linux distro) and I don’t regret it so far. This post is about my first impressions about Gentoo.
NFS : see what’s exported from an NFS server
To know what directories are exported by a NFS server, you can use the showmount -e nfs_server from a NFS client.
[root@client:~]# showmount -e server<br /> Export list for server:<br /> /data/dir1 (everyone)<br /> /data/dir2 client1 client2 client3
(The /data/dir2 is exported only to specified clients)
Sun Solaris 10 : Creating snapshots with ZFS
ZFS is a great filesystem. Amongst its many features, it has snapshots. Let’s see how to use them.
Securing automated rsync over SSH
Quoting the RSYNC homepage : “rsync is an open source utility that provides fast incremental file transfer.”
To make rsync both secure and automated (i.e : non-interactive), you can use SSH as the transport and set up a key pair. This is what will be discussed in this post, along with a few improvements.
OpenSolaris 2008.05 released today
OpenSolaris 2008.05 is released today, you can grab it from the OpenSolaris website.
The distribution is a bootable CD which will let you try it before installing. It includes most of the big hits of Solaris 10 (zfs, dtrace, containers and so on).
If you never tried Solaris or OpenSolaris, this might be a good kick start !
SSH slow to connect to a Solaris 10 host
If you experience a slow SSH connection to a Solaris 10 host while after connection everything works fine, then read on !
OpenBSD : Release 4.3 is out
The twice-a-year release of OpenBSD is out today (More details on Undeadly). You can buy the CD set or get it by FTP (in this case consider donating to the project as CD sales are the main source of income to the project).
Enjoy.
CFEngine : Checking for processes
CFEngine can do wonders to keep a cluster in shape, but it can be very useful for a single server as well. Here is a configuration sample to monitor a few common services and restart them should they fail.
Unix : shell tips
I ran into this into the following article, “Learn 10 good UNIX usage habits“. This article is mainly common sense, but there are interesting points, such as :
- avoid piping when you can, in order to save performance (the classical construct grep | wc to count the lines is useless as most versions of grep can count with grep -c)
- use awk to “grep” on a specific field of a line with “… | awk ‘$1 == “XXX”‘ which is cool and I never use
- the find | xargs construct (I’d add “find -print0 | xargs -0”, useful if your find brings back filenames with a space inside …)
All in all it is worth a reading, if only to refresh your memory.
dsh : a distributed shell
A common problem when you deal with a pool of servers (clusters or server farms, you name it) is to execute the same command line on each server. It is usual to solve this with a “for” construct such as :
for i in server1 server2 ; do ssh $i "uname -a"; done
But this is basically re-inventing the wheel everytime. Here comes Distributed Shell (DSH).
Perl : Convert time from Epoch to local time

This little Perl one-liner can get handy when you need to translate “time in seconds since the Epoch” (for example in logs) to local time :
% perl -e 'print scalar(localtime(1202484725)), "\n";'<br /> Fri Feb 8 16:32:05 2008<br /> %
This was pretty useful today when browsing through Nagios event logs, where times are given in seconds from the Epoch.
By the way, the Epoch is defined as 00:00 UTC on January, 1st, 1970.
Perl : Optimizing pattern searches with Regexp::Assemble
When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.
In order to optimize such a pattern matching, you can use the Regexp::Assemble module.
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
Unix : the “script” command
The script command is a must for any unix sysadmin.
Once invoked, it will faithfully write anything you typed as well as any output generated in your terminal into a file of your choice (defaults to “typescript”).
This is great when you want to document everything you did on a specific server, for example.
spaghetti:~$ script<br /> Script started, file is typescript<br /> spaghetti:~$<br />
When launched, you don’t see anything, but everything displayed goes to a file as well as the terminal.
sed : replacing a text in a file
To replace a text in a file, you can invoke sed as in the following example :
% cat file.txt | sed -e 's/text/replacement/g' > result.txt
This will change all the occurences of “text” to “replacement” in “file.txt” and output the result in “result.txt”
Note : As suggested by Matthias from adminlife in the comments, if you wanted to do “in place” text replacement (that is modify the file without a temporary file in between), you can do the following :
Solaris 10: On which CD is that XYZ package ?
If you want to know on which CD is a package, without :
- Mounting CD
- Searching
- Unmounting
- Swear and
- Go back to 1
Then you can :
- Mount CD #1 (mount -F hsfs /dev/dsk/
/mnt or, if you have automount cd /cdrom/cdrom0 or something like that) - Go in the Solaris_10/Product directory of the CD
- Do grep -l
.virtual_packagetoc_* which will output the .virtual_packagetoc_N where N is the number of the CD holding that package.
Exemple :
CFEngine – Installing on Debian GNU/Linux
In this post we’ll install CFEngine on a Debian system. Debian make is really simple to install any packages, so let’s follow the “standard” package installation procedure (I’ll assume that apt is correctly setup on your system ! If you have troubles with it, let me know, I’ll write a post on this topic).
CFEngine – What is it ?
CFEngine is a configuration management engine. I’m going to write a series of short posts as I’m going to use CFEngine in a current project. Let’s start with a short description of CFEngine purpose and main features.
Keeping track of changes with cfengine and SubVersioN
Cfengine is a tool which purpose is to describe what is a healthy system and how to bring it back to normal when something fails.
I won’t go into an explanation about how cfengine works, because the project webpage already has a neat tutorial and complete reference. Instead of that, I’ll explain how I used cfengine to build a fool proof Linux firewall.
OpenBSD : Give money !!
not to me !! 😀
The OpenBSD project needs money to hold its events (such as hackaton, where developpers gather to implement features, or usual running costs).
If you think you don’t use OpenBSD, think again ! The project OpenSSH, which implements a free, and secure SSH implementation, comes from OpenBSD. It is widely used in many OSes and appliances …
We need OpenBSD !! Don’t hesitate to make a donation !
The original post
The OpenBSD project
The OpenSSH sister project
Tag: Gentoo
Getting Spotify to run on Gentoo/Linux: A Gross and Cruel Hack
Spotify is a great way to listen to music. Unfortunately the official client only runs on Windows and Mac machines. There is an experimental unsupported client for linux, however it’s provided as a DEB (ubuntu/debian) package.
Here’s a gross hack for whom is desperate to get it working on Gentoo.
Gentoo + OpenVPN : getting things started in the correct order
I’m running an OpenVPN server, configured in bridging mode.
I had quite a bit of trouble getting OpenVPN to start after networking is up, but before the the bridge is setup so that the tap0 device, which is created by OpenVPN can be added to the bridge.
The solution is simpler : let the tap0 be automatically created and added to the bridge by Gentoo Linux, then start OpenVPN with a config file instructing to use the already created tap0 device.
This post shows the configuration snippets to get things started in the right order on Gentoo.
Gentoo Linux / Portage : How to know which package provided an installed file
If there’s a file installed on your disk for which you’d like to know what package provided it, you can use the equery command like below :
Gentoo : Xorg X Server 3D hardware acceleration
You need to have read/write permissions to /dev/dri/cardX to benefit from 3D hardware acceleration in Xorg X Server. On a Gentoo linux machine, this file has the following permissions set by default :
ls -l /dev/dri/card0
crw-rw---- 1 root video 226, 0 2009-10-14 16:12 /dev/dri/card0
Gentoo : Running Cacti with LigHTTPD
If you use Gentoo and tried to install Cacti with Lighttpd instead of Apache, chances are that you ran into this error message :
/usr/lib/python2.6/site-packages/WebappConfig/content.py:27: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5, re, os, os.path
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=www-servers/apache-1.3" or correct your settings.
* Fatal error(s) - aborting
Gentoo : Managing software packages
In this post I’ll cover the basics one needs to know to install, upgrade and remove packages on a Gentoo linux system.
Gentoo : First thoughts after the switch
I’ve recently switched to the Gentoo Linux distribution (mostly to experiment with this Linux distro) and I don’t regret it so far. This post is about my first impressions about Gentoo.
Tag: Spotify
Getting Spotify to run on Gentoo/Linux: A Gross and Cruel Hack
Spotify is a great way to listen to music. Unfortunately the official client only runs on Windows and Mac machines. There is an experimental unsupported client for linux, however it’s provided as a DEB (ubuntu/debian) package.
Here’s a gross hack for whom is desperate to get it working on Gentoo.
Tag: Asterisk
Asterisk 101 : How to get rid of your mother-in-law …
… or anyone else really, with a little trick to implement a black list and filter unwanted callers.
Asterisk 101 – Ghetto GoogleVoice : Signing up for / using GV even if you’re not in the USA using Asterisk
GoogleVoice (GV for short) is a great service (I won’t go into the details, but you can read up about it here), but it is unfortunately accessible only if you are in the USA.
Granted there is already plenty of documentation about how to circumvent this, but I’m not aware of any of those using Asterisk.
So this post will document how to sign up for a GV account as well as how to use it with Asterisk afterwards, in the prospect of using it if you are not in the USA.
In order to be able to sign up for GV, you need to meet 2 prerequisites :
- You need to have a US IP address
- You need to have a US phone number, which will be used to validate your GV account
Step 1 is left as an exercise to the reader (“Good luck ! I’m behind 7 proxies !” :D).
Step 2 is the one we’re going to describe here, as an example of what you can pull with simple Asterisk configurations.
Asterisk 101 : How to troll telemarketers (aka automatically send hidden Caller ID to a waiting music forever)
If like me you get tons of telemarketers calls, there’s an easy way to get rid of them with a quick Asterisk hack. The following Asterisk configuration snippet will immediately send any hidden caller ID (99% telemarketers, and I have a general policy of not picking up the phone for hidden caller ID anyway) to a holding music making them waste money and time…
Asterisk : Basic SOHO environment VoIP PABX configuration
Asterisk is a free telephony software. I’m posting here sample commented configuration files for reference purposes, hoping they will help you get kickstarted if needed.
This config sets up :
- SIP phones (for softphones or harware phones with SIP capabilities)
- Voice mails
- A few test phone numbers
- Forwarding of calls to a SIP provider for outbound and incoming calls (from/to PSTN)
That should be plenty already for a SOHO environment !
Note to French readers : Si votre FAI est Free, cette configuration fonctionne pour passer / recevoir des appels via le SIP de Free (Freephonie).
Tag: Blacklist
Asterisk 101 : How to get rid of your mother-in-law …
… or anyone else really, with a little trick to implement a black list and filter unwanted callers.
Tag: Tutorial
Asterisk 101 : How to get rid of your mother-in-law …
… or anyone else really, with a little trick to implement a black list and filter unwanted callers.
Asterisk 101 – Ghetto GoogleVoice : Signing up for / using GV even if you’re not in the USA using Asterisk
GoogleVoice (GV for short) is a great service (I won’t go into the details, but you can read up about it here), but it is unfortunately accessible only if you are in the USA.
Granted there is already plenty of documentation about how to circumvent this, but I’m not aware of any of those using Asterisk.
So this post will document how to sign up for a GV account as well as how to use it with Asterisk afterwards, in the prospect of using it if you are not in the USA.
In order to be able to sign up for GV, you need to meet 2 prerequisites :
- You need to have a US IP address
- You need to have a US phone number, which will be used to validate your GV account
Step 1 is left as an exercise to the reader (“Good luck ! I’m behind 7 proxies !” :D).
Step 2 is the one we’re going to describe here, as an example of what you can pull with simple Asterisk configurations.
Unix 101 : Filesystem basics & Special files
This post is meant to clarify a few key concepts about Unix filesystems such as directory permissions, hardlinks and symlinks.
D-Bus introduction in Perl
As stated in Wikipedia :
D-Bus (Desktop Bus) is a simple inter-process communication (IPC) system for software applications to communicate with one another.
This post provides a simple code snippet in Perl to help you getting started with D-Bus programming.
Gentoo : Managing software packages
In this post I’ll cover the basics one needs to know to install, upgrade and remove packages on a Gentoo linux system.
Linux : Using loop devices (eg : mounting an ISO file)
If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso<br /> spaghetti% sudo mount /dev/loop0 /mnt<br /> spaghetti% ls /mnt<br /> Autorun.inf setup.exe setup.ico<br /> spaghetti%<br /> [...]<br /> spaghetti% sudo umount /mnt<br /> spaghetti% sudo losetup -d /dev/loop0
This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
Tag: Googlevoice
Asterisk 101 – Ghetto GoogleVoice : Signing up for / using GV even if you’re not in the USA using Asterisk
GoogleVoice (GV for short) is a great service (I won’t go into the details, but you can read up about it here), but it is unfortunately accessible only if you are in the USA.
Granted there is already plenty of documentation about how to circumvent this, but I’m not aware of any of those using Asterisk.
So this post will document how to sign up for a GV account as well as how to use it with Asterisk afterwards, in the prospect of using it if you are not in the USA.
In order to be able to sign up for GV, you need to meet 2 prerequisites :
- You need to have a US IP address
- You need to have a US phone number, which will be used to validate your GV account
Step 1 is left as an exercise to the reader (“Good luck ! I’m behind 7 proxies !” :D).
Step 2 is the one we’re going to describe here, as an example of what you can pull with simple Asterisk configurations.
Tag: Systems
Unix 101 : Showing non-printing characters in text files (ex : DOS files)
A non-printing character is a character which won’t actually get directly printed (or displayed) but rather interpreted. Such non-printing characters are for example line-feed or tabulation. The interpretation of those characters can differ from one system to the next. For example the line-feed character is different on Unix or DOS.
If you need an easy way to confirm that a text file is DOS or UNIX formatted (they differ with respect to the end of line character(s) for example) or if you wish to display normally non-printing characters of a text file, you can use the -vET command line switches of the cat utility.
As explained in the man page :
- -v : will use the ^ and M- notation for control and multibytes characters
- -E : will make ends of lines visible
- -T : will make tabulations visible
For example :
Linux : Using loop devices (eg : mounting an ISO file)
If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso<br /> spaghetti% sudo mount /dev/loop0 /mnt<br /> spaghetti% ls /mnt<br /> Autorun.inf setup.exe setup.ico<br /> spaghetti%<br /> [...]<br /> spaghetti% sudo umount /mnt<br /> spaghetti% sudo losetup -d /dev/loop0
This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.
Tag: Caller Id
Asterisk 101 : How to troll telemarketers (aka automatically send hidden Caller ID to a waiting music forever)
If like me you get tons of telemarketers calls, there’s an easy way to get rid of them with a quick Asterisk hack. The following Asterisk configuration snippet will immediately send any hidden caller ID (99% telemarketers, and I have a general policy of not picking up the phone for hidden caller ID anyway) to a holding music making them waste money and time…
Tag: Telemarketers
Asterisk 101 : How to troll telemarketers (aka automatically send hidden Caller ID to a waiting music forever)
If like me you get tons of telemarketers calls, there’s an easy way to get rid of them with a quick Asterisk hack. The following Asterisk configuration snippet will immediately send any hidden caller ID (99% telemarketers, and I have a general policy of not picking up the phone for hidden caller ID anyway) to a holding music making them waste money and time…
Tag: Filesystem
Unix 101 : Filesystem basics & Special files
This post is meant to clarify a few key concepts about Unix filesystems such as directory permissions, hardlinks and symlinks.
Tag: Hardlinks
Unix 101 : Filesystem basics & Special files
This post is meant to clarify a few key concepts about Unix filesystems such as directory permissions, hardlinks and symlinks.
Tag: Sticky Bit
Unix 101 : Filesystem basics & Special files
This post is meant to clarify a few key concepts about Unix filesystems such as directory permissions, hardlinks and symlinks.
Tag: Symlinks
Unix 101 : Filesystem basics & Special files
This post is meant to clarify a few key concepts about Unix filesystems such as directory permissions, hardlinks and symlinks.
shell tip : identify broken symlinks
If you need to identify broken symlinks, you can do the following :
find -L . -type l
The -L options instructs find to follow symlinks when possible. Hence no “working symlink” will ever get returned as the targets won’t match -type l (meaning “file is a symlink”).
On the other hand, find will not be able to follow broken symlinks, so the information will be taken from the symlink itself and not from the non-existent or otherwise unreachable target. The -type l will then be a match and the broken symlink filename will be returned.
Tag: Home Automation
MisterHouse : Setting up “modes”
MisterHouse is a fantastic home automation software with an impressive out-of-the-box feature set, and it only gets better if you know a bit of Perl.
You can conveniently set “modes”, which are settings with states you can define and use. You can then fire events upon state change, and so are they very useful to define some sort of macros.
A few examples :
- the “Security” mode could be “on” or “off” : setting it “on” would close the shutters and activate the alarm system; setting it “off” would do the opposite;
- the “Heating” mode could be “day”, “night”, “frost protection only” : setting it on “day” would set the target temperature to 20â°C, “night” to 15â°C and “frost protection only” to 7â°C
- the “Cinema” mode could be “on” or “off” : setting it to “on” would close the blinds and dim the lights; “off” would bring those back to their former states.
X10 Home automation : Heyu a tool for managing a CM11
I currently manage all my X10 home automation with MisterHouse which is a fantastic tool but is a bit on the heavyweight side. Plus you need to know a bit of Perl to take full advantage of it.
If you are looking for something simpler to use, you might want to consider HEYU.
Tag: Misterhouse
MisterHouse : Setting up “modes”
MisterHouse is a fantastic home automation software with an impressive out-of-the-box feature set, and it only gets better if you know a bit of Perl.
You can conveniently set “modes”, which are settings with states you can define and use. You can then fire events upon state change, and so are they very useful to define some sort of macros.
A few examples :
- the “Security” mode could be “on” or “off” : setting it “on” would close the shutters and activate the alarm system; setting it “off” would do the opposite;
- the “Heating” mode could be “day”, “night”, “frost protection only” : setting it on “day” would set the target temperature to 20â°C, “night” to 15â°C and “frost protection only” to 7â°C
- the “Cinema” mode could be “on” or “off” : setting it to “on” would close the blinds and dim the lights; “off” would bring those back to their former states.
Tag: Perl
MisterHouse : Setting up “modes”
MisterHouse is a fantastic home automation software with an impressive out-of-the-box feature set, and it only gets better if you know a bit of Perl.
You can conveniently set “modes”, which are settings with states you can define and use. You can then fire events upon state change, and so are they very useful to define some sort of macros.
A few examples :
- the “Security” mode could be “on” or “off” : setting it “on” would close the shutters and activate the alarm system; setting it “off” would do the opposite;
- the “Heating” mode could be “day”, “night”, “frost protection only” : setting it on “day” would set the target temperature to 20â°C, “night” to 15â°C and “frost protection only” to 7â°C
- the “Cinema” mode could be “on” or “off” : setting it to “on” would close the blinds and dim the lights; “off” would bring those back to their former states.
Facebook API : Exporting your friends birthdays into vCards format
The following sample Facebook desktop application exports your friends birthdays in a vCard file format. This file is suitable to be imported into your GMail contacts for example.
Perl : Counting occurences of IP addresses in Apache logs
This Perl one-liner is intended to print the 10 most frequent client IP addresses in an Apache log file. It can easily be recycled to count anything, though.
Perl+Twitter : Getting @mentions from command line
This code snippet demonstrates how easy it is to collect your twitter @mentions in Perl, coupled with curl for simplicity.
Perl : Using the Finance::Quote module to get your stock prices
Finance::Quote is a Perl module which can be used to obtain stock information from various internet sources. I thought I’d rather share this code snippet as an example showing how easy it is to use, before I turn it into a bloatware with an SQL backend to compute average price per share and what not 🙂
So here is a simple snippet demonstrating how to get the price of a stock :
D-Bus introduction in Perl
As stated in Wikipedia :
D-Bus (Desktop Bus) is a simple inter-process communication (IPC) system for software applications to communicate with one another.
This post provides a simple code snippet in Perl to help you getting started with D-Bus programming.
Perl : Convert time from Epoch to local time

This little Perl one-liner can get handy when you need to translate “time in seconds since the Epoch” (for example in logs) to local time :
% perl -e 'print scalar(localtime(1202484725)), "\n";'<br /> Fri Feb 8 16:32:05 2008<br /> %
This was pretty useful today when browsing through Nagios event logs, where times are given in seconds from the Epoch.
By the way, the Epoch is defined as 00:00 UTC on January, 1st, 1970.
Perl : A module to play with a GSM mobile
As you might have read in my previous post about accessing your cell phone with the AT-commands under Linux.
If not, you might want to start there for a little context.
I finally wrote and released on CPAN a Perl module which will help to automate cell phone operations such as saving/restoring the phonebook or sending an SMS.
Examples are included in the documentation. I believe I made it easy to use, but let me know if I’m wrong 😀 .
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Perl : Optimizing pattern searches with Regexp::Assemble
When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.
In order to optimize such a pattern matching, you can use the Regexp::Assemble module.
Tag: Caps Lock
Linux + Xorg : Remapping caps lock key to escape
In this post I’ll revisit the classical “how to remap caps lock into something useful” once again. In this post, I’ll show how to remap the caps lock key to have an extra Escape key, which is very useful for all VI/Vim users.
Tag: Hal
Linux + Xorg : Remapping caps lock key to escape
In this post I’ll revisit the classical “how to remap caps lock into something useful” once again. In this post, I’ll show how to remap the caps lock key to have an extra Escape key, which is very useful for all VI/Vim users.
HAL + Xorg X server : Using HAL to set hardware specific configurations for Xorg Xserver
The Xorg X Server can now rely on HAL to get information about the hardware the machine is running. This allows the X Server to auto-configure most of its components such as keyboard / mouse / screen / graphic adapter. But there is still room for tweaking it if needed.
This post explains how to configure extra properties for a keyboard at the HAL level, so that X Server will correctly auto-configure it for you.
Tag: Xorg
Linux + Xorg : Remapping caps lock key to escape
In this post I’ll revisit the classical “how to remap caps lock into something useful” once again. In this post, I’ll show how to remap the caps lock key to have an extra Escape key, which is very useful for all VI/Vim users.
Gentoo : Xorg X Server 3D hardware acceleration
You need to have read/write permissions to /dev/dri/cardX to benefit from 3D hardware acceleration in Xorg X Server. On a Gentoo linux machine, this file has the following permissions set by default :
ls -l /dev/dri/card0
crw-rw---- 1 root video 226, 0 2009-10-14 16:12 /dev/dri/card0
HAL + Xorg X server : Using HAL to set hardware specific configurations for Xorg Xserver
The Xorg X Server can now rely on HAL to get information about the hardware the machine is running. This allows the X Server to auto-configure most of its components such as keyboard / mouse / screen / graphic adapter. But there is still room for tweaking it if needed.
This post explains how to configure extra properties for a keyboard at the HAL level, so that X Server will correctly auto-configure it for you.
Tag: Api
Facebook API : Exporting your friends birthdays into vCards format
The following sample Facebook desktop application exports your friends birthdays in a vCard file format. This file is suitable to be imported into your GMail contacts for example.
Tag: AutoHotkey
AutoHotkey : Copying without formatting
One of the common annoyances of copy-pasting on Windows is that it tries to copy-paste the formatting as well. This issue can easily be fixed by the following AutoHotkey macro, which will copy the selection to the clipboard as pure text.
Tag: Clipboard
AutoHotkey : Copying without formatting
One of the common annoyances of copy-pasting on Windows is that it tries to copy-paste the formatting as well. This issue can easily be fixed by the following AutoHotkey macro, which will copy the selection to the clipboard as pure text.
Tag: Macro
AutoHotkey : Copying without formatting
One of the common annoyances of copy-pasting on Windows is that it tries to copy-paste the formatting as well. This issue can easily be fixed by the following AutoHotkey macro, which will copy the selection to the clipboard as pure text.
Tag: Tips
AutoHotkey : Copying without formatting
One of the common annoyances of copy-pasting on Windows is that it tries to copy-paste the formatting as well. This issue can easily be fixed by the following AutoHotkey macro, which will copy the selection to the clipboard as pure text.
Bash / zsh : Using the history expansion
One of the features of bash I’ve too long overlooked is its history expansion. In this post I’ll show a few examples to get a grip at it.
shell tip : identify broken symlinks
If you need to identify broken symlinks, you can do the following :
find -L . -type l
The -L options instructs find to follow symlinks when possible. Hence no “working symlink” will ever get returned as the targets won’t match -type l (meaning “file is a symlink”).
On the other hand, find will not be able to follow broken symlinks, so the information will be taken from the symlink itself and not from the non-existent or otherwise unreachable target. The -type l will then be a match and the broken symlink filename will be returned.
Unix : shell tips
I ran into this into the following article, “Learn 10 good UNIX usage habits“. This article is mainly common sense, but there are interesting points, such as :
- avoid piping when you can, in order to save performance (the classical construct grep | wc to count the lines is useless as most versions of grep can count with grep -c)
- use awk to “grep” on a specific field of a line with “… | awk ‘$1 == “XXX”‘ which is cool and I never use
- the find | xargs construct (I’d add “find -print0 | xargs -0”, useful if your find brings back filenames with a space inside …)
All in all it is worth a reading, if only to refresh your memory.
Tag: Windows
AutoHotkey : Copying without formatting
One of the common annoyances of copy-pasting on Windows is that it tries to copy-paste the formatting as well. This issue can easily be fixed by the following AutoHotkey macro, which will copy the selection to the clipboard as pure text.
MSN : get rid of Backdoor.Generic3.SAT
If you got this virus (or know someone who did), and it is spreading to all of your MSN contacts with something like the following message :
hey How are you???? this is ur pic rite?!<br /> http://www.msn- gallery.com/gallery.php?user=some_nickname.jpg
or in French something like :
http://msn-friends. iquebec.com/?photo=some_nickname<br /> ta tof fais koi sur ce site :P
Then you can use the following article (there is a removal tool) to get rid of it : How to Remove MSN Virus Project 1/ Generic2.EXO / Backdoor.Generic3.SAT
Tag: Freephonie
Asterisk : Basic SOHO environment VoIP PABX configuration
Asterisk is a free telephony software. I’m posting here sample commented configuration files for reference purposes, hoping they will help you get kickstarted if needed.
This config sets up :
- SIP phones (for softphones or harware phones with SIP capabilities)
- Voice mails
- A few test phone numbers
- Forwarding of calls to a SIP provider for outbound and incoming calls (from/to PSTN)
That should be plenty already for a SOHO environment !
Note to French readers : Si votre FAI est Free, cette configuration fonctionne pour passer / recevoir des appels via le SIP de Free (Freephonie).
Tag: Sip
Asterisk : Basic SOHO environment VoIP PABX configuration
Asterisk is a free telephony software. I’m posting here sample commented configuration files for reference purposes, hoping they will help you get kickstarted if needed.
This config sets up :
- SIP phones (for softphones or harware phones with SIP capabilities)
- Voice mails
- A few test phone numbers
- Forwarding of calls to a SIP provider for outbound and incoming calls (from/to PSTN)
That should be plenty already for a SOHO environment !
Note to French readers : Si votre FAI est Free, cette configuration fonctionne pour passer / recevoir des appels via le SIP de Free (Freephonie).
Tag: Softphones
Asterisk : Basic SOHO environment VoIP PABX configuration
Asterisk is a free telephony software. I’m posting here sample commented configuration files for reference purposes, hoping they will help you get kickstarted if needed.
This config sets up :
- SIP phones (for softphones or harware phones with SIP capabilities)
- Voice mails
- A few test phone numbers
- Forwarding of calls to a SIP provider for outbound and incoming calls (from/to PSTN)
That should be plenty already for a SOHO environment !
Note to French readers : Si votre FAI est Free, cette configuration fonctionne pour passer / recevoir des appels via le SIP de Free (Freephonie).
Tag: Voip
Asterisk : Basic SOHO environment VoIP PABX configuration
Asterisk is a free telephony software. I’m posting here sample commented configuration files for reference purposes, hoping they will help you get kickstarted if needed.
This config sets up :
- SIP phones (for softphones or harware phones with SIP capabilities)
- Voice mails
- A few test phone numbers
- Forwarding of calls to a SIP provider for outbound and incoming calls (from/to PSTN)
That should be plenty already for a SOHO environment !
Note to French readers : Si votre FAI est Free, cette configuration fonctionne pour passer / recevoir des appels via le SIP de Free (Freephonie).
Tag: Networks
Gentoo + OpenVPN : getting things started in the correct order
I’m running an OpenVPN server, configured in bridging mode.
I had quite a bit of trouble getting OpenVPN to start after networking is up, but before the the bridge is setup so that the tap0 device, which is created by OpenVPN can be added to the bridge.
The solution is simpler : let the tap0 be automatically created and added to the bridge by Gentoo Linux, then start OpenVPN with a config file instructing to use the already created tap0 device.
This post shows the configuration snippets to get things started in the right order on Gentoo.
Tag: Openvpn
Gentoo + OpenVPN : getting things started in the correct order
I’m running an OpenVPN server, configured in bridging mode.
I had quite a bit of trouble getting OpenVPN to start after networking is up, but before the the bridge is setup so that the tap0 device, which is created by OpenVPN can be added to the bridge.
The solution is simpler : let the tap0 be automatically created and added to the bridge by Gentoo Linux, then start OpenVPN with a config file instructing to use the already created tap0 device.
This post shows the configuration snippets to get things started in the right order on Gentoo.
Tag: Vpn
Gentoo + OpenVPN : getting things started in the correct order
I’m running an OpenVPN server, configured in bridging mode.
I had quite a bit of trouble getting OpenVPN to start after networking is up, but before the the bridge is setup so that the tap0 device, which is created by OpenVPN can be added to the bridge.
The solution is simpler : let the tap0 be automatically created and added to the bridge by Gentoo Linux, then start OpenVPN with a config file instructing to use the already created tap0 device.
This post shows the configuration snippets to get things started in the right order on Gentoo.
Tag: Bash
Bash / zsh : Using the history expansion
One of the features of bash I’ve too long overlooked is its history expansion. In this post I’ll show a few examples to get a grip at it.
Tag: History
Bash / zsh : Using the history expansion
One of the features of bash I’ve too long overlooked is its history expansion. In this post I’ll show a few examples to get a grip at it.
Tag: Zsh
Bash / zsh : Using the history expansion
One of the features of bash I’ve too long overlooked is its history expansion. In this post I’ll show a few examples to get a grip at it.
Tag: Apache Logs
Perl : Counting occurences of IP addresses in Apache logs
This Perl one-liner is intended to print the 10 most frequent client IP addresses in an Apache log file. It can easily be recycled to count anything, though.
Tag: Tip
Perl : Counting occurences of IP addresses in Apache logs
This Perl one-liner is intended to print the 10 most frequent client IP addresses in an Apache log file. It can easily be recycled to count anything, though.
Unix : the “script” command
The script command is a must for any unix sysadmin.
Once invoked, it will faithfully write anything you typed as well as any output generated in your terminal into a file of your choice (defaults to “typescript”).
This is great when you want to document everything you did on a specific server, for example.
spaghetti:~$ script<br /> Script started, file is typescript<br /> spaghetti:~$<br />
When launched, you don’t see anything, but everything displayed goes to a file as well as the terminal.
Solaris 10: On which CD is that XYZ package ?
If you want to know on which CD is a package, without :
- Mounting CD
- Searching
- Unmounting
- Swear and
- Go back to 1
Then you can :
- Mount CD #1 (mount -F hsfs /dev/dsk/
/mnt or, if you have automount cd /cdrom/cdrom0 or something like that) - Go in the Solaris_10/Product directory of the CD
- Do grep -l
.virtual_packagetoc_* which will output the .virtual_packagetoc_N where N is the number of the CD holding that package.
Exemple :
Tag: Aix
AIX : Use sar to check cpu usage
If you’re looking for CPU usage statistics and system performance on IBM AIX, sar might just be the tool your looking for. It’ll display information for 5 minutes intervals from midnight to current time. The output looks like this :
Tag: Performance
AIX : Use sar to check cpu usage
If you’re looking for CPU usage statistics and system performance on IBM AIX, sar might just be the tool your looking for. It’ll display information for 5 minutes intervals from midnight to current time. The output looks like this :
Estimating network throughput / bandwidth / performance with FTP
On a Unix machine, you can use this little ftp trick to have an idea of your throughput :
ftp somehost
ftp> put “| dd if=/dev/zero bs=100000 count=100” /dev/null
200 PORT command successful.
150 ASCII data connection for /dev/null (192.168.0.1,32953).
100+0 records in
100+0 records out
226 Transfer complete.
local: | dd if=/dev/zero bs=100000 count=100 remote: /dev/null
10000000 bytes sent in 2.9 seconds (3388.52 Kbytes/s)
This will generate a stream of bytes from one host to another and give you the data rate at the end
Tag: Sar
AIX : Use sar to check cpu usage
If you’re looking for CPU usage statistics and system performance on IBM AIX, sar might just be the tool your looking for. It’ll display information for 5 minutes intervals from midnight to current time. The output looks like this :
Tag: Top
AIX : Use sar to check cpu usage
If you’re looking for CPU usage statistics and system performance on IBM AIX, sar might just be the tool your looking for. It’ll display information for 5 minutes intervals from midnight to current time. The output looks like this :
Tag: Topas
AIX : Use sar to check cpu usage
If you’re looking for CPU usage statistics and system performance on IBM AIX, sar might just be the tool your looking for. It’ll display information for 5 minutes intervals from midnight to current time. The output looks like this :
Tag: JSON
Perl+Twitter : Getting @mentions from command line
This code snippet demonstrates how easy it is to collect your twitter @mentions in Perl, coupled with curl for simplicity.
Tag: Mentions
Perl+Twitter : Getting @mentions from command line
This code snippet demonstrates how easy it is to collect your twitter @mentions in Perl, coupled with curl for simplicity.
Tag: Twitter
Perl+Twitter : Getting @mentions from command line
This code snippet demonstrates how easy it is to collect your twitter @mentions in Perl, coupled with curl for simplicity.
Tag: Df
Linux / Unix : Disk usage and identifying biggest files
When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
Tag: Du
Linux / Unix : Disk usage and identifying biggest files
When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
Tag: Find
Linux / Unix : Disk usage and identifying biggest files
When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
Tag: Fs Full
Linux / Unix : Disk usage and identifying biggest files
When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
Tag: Sysadmin
Linux / Unix : Disk usage and identifying biggest files
When working as a systems administrator, you’ll always end up having to solve a file system full error in a hurry. Here are a few commands and hints to help you get out of it quickly on a UNIX like system.
Gentoo : First thoughts after the switch
I’ve recently switched to the Gentoo Linux distribution (mostly to experiment with this Linux distro) and I don’t regret it so far. This post is about my first impressions about Gentoo.
CFEngine : Checking for processes
CFEngine can do wonders to keep a cluster in shape, but it can be very useful for a single server as well. Here is a configuration sample to monitor a few common services and restart them should they fail.
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
CFEngine – Installing on Debian GNU/Linux
In this post we’ll install CFEngine on a Debian system. Debian make is really simple to install any packages, so let’s follow the “standard” package installation procedure (I’ll assume that apt is correctly setup on your system ! If you have troubles with it, let me know, I’ll write a post on this topic).
CFEngine – What is it ?
CFEngine is a configuration management engine. I’m going to write a series of short posts as I’m going to use CFEngine in a current project. Let’s start with a short description of CFEngine purpose and main features.
Keeping track of changes with cfengine and SubVersioN
Cfengine is a tool which purpose is to describe what is a healthy system and how to bring it back to normal when something fails.
I won’t go into an explanation about how cfengine works, because the project webpage already has a neat tutorial and complete reference. Instead of that, I’ll explain how I used cfengine to build a fool proof Linux firewall.
Tag: Emails
Monitoring batches in IT environment : efficiently using emails
Sometimes automatically running scripts in production environments are simply monitored by emails. Those scripts may run on schedule or be triggered by events and they send an email (for example to the technical support level 1) upon completion of the job. The content of the email will then give information about the outcome of the execution of the script.
This posts lists a few ideas that you might find useful to implement when in such an environment.
Tag: IT
Monitoring batches in IT environment : efficiently using emails
Sometimes automatically running scripts in production environments are simply monitored by emails. Those scripts may run on schedule or be triggered by events and they send an email (for example to the technical support level 1) upon completion of the job. The content of the email will then give information about the outcome of the execution of the script.
This posts lists a few ideas that you might find useful to implement when in such an environment.
ITIL: What is the CAB ?
ITIL Methodology advises that every RFC (Request For Change) be run through the CAB (Change Advisory Board).
What’s that all about, and why ? Read on !
Tag: Monitoring
Monitoring batches in IT environment : efficiently using emails
Sometimes automatically running scripts in production environments are simply monitored by emails. Those scripts may run on schedule or be triggered by events and they send an email (for example to the technical support level 1) upon completion of the job. The content of the email will then give information about the outcome of the execution of the script.
This posts lists a few ideas that you might find useful to implement when in such an environment.
Tag: Scripts
Monitoring batches in IT environment : efficiently using emails
Sometimes automatically running scripts in production environments are simply monitored by emails. Those scripts may run on schedule or be triggered by events and they send an email (for example to the technical support level 1) upon completion of the job. The content of the email will then give information about the outcome of the execution of the script.
This posts lists a few ideas that you might find useful to implement when in such an environment.
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
Tag: Annoyance
Firefox (Linux) : “Middle-click on page loads URL” annoyance
Firefox will load whatever URL is in the copy-paste buffer in the page if you middle click somewhere on a page. My mouse’s wheel also serves as the middle button, and I found it really annoying that when occasionally middle-clicking while scrolling the page, Firefox would try to load another page …
You can control this behaviour with this about:config property middlemouse.contentLoadURL. Set to true, the middle-click on the page will load the URL (if it is one) in the page, set to false it won’t.
Tag: Firefox
Firefox (Linux) : “Middle-click on page loads URL” annoyance
Firefox will load whatever URL is in the copy-paste buffer in the page if you middle click somewhere on a page. My mouse’s wheel also serves as the middle button, and I found it really annoying that when occasionally middle-clicking while scrolling the page, Firefox would try to load another page …
You can control this behaviour with this about:config property middlemouse.contentLoadURL. Set to true, the middle-click on the page will load the URL (if it is one) in the page, set to false it won’t.
Tag: Conky
Perl : Using the Finance::Quote module to get your stock prices
Finance::Quote is a Perl module which can be used to obtain stock information from various internet sources. I thought I’d rather share this code snippet as an example showing how easy it is to use, before I turn it into a bloatware with an SQL backend to compute average price per share and what not 🙂
So here is a simple snippet demonstrating how to get the price of a stock :
Tag: Finance::Quote
Perl : Using the Finance::Quote module to get your stock prices
Finance::Quote is a Perl module which can be used to obtain stock information from various internet sources. I thought I’d rather share this code snippet as an example showing how easy it is to use, before I turn it into a bloatware with an SQL backend to compute average price per share and what not 🙂
So here is a simple snippet demonstrating how to get the price of a stock :
Tag: Stocks
Perl : Using the Finance::Quote module to get your stock prices
Finance::Quote is a Perl module which can be used to obtain stock information from various internet sources. I thought I’d rather share this code snippet as an example showing how easy it is to use, before I turn it into a bloatware with an SQL backend to compute average price per share and what not 🙂
So here is a simple snippet demonstrating how to get the price of a stock :
Tag: Equery
Gentoo Linux / Portage : How to know which package provided an installed file
If there’s a file installed on your disk for which you’d like to know what package provided it, you can use the equery command like below :
Tag: Portage
Gentoo Linux / Portage : How to know which package provided an installed file
If there’s a file installed on your disk for which you’d like to know what package provided it, you can use the equery command like below :
Tag: Clone
VirtualBox : Cloning a virtual hard disk
If you’ve got a VirtualBox VM already installed and you wish to clone/copy it, follow the steps below :
Tag: Clonehd
VirtualBox : Cloning a virtual hard disk
If you’ve got a VirtualBox VM already installed and you wish to clone/copy it, follow the steps below :
Tag: VirtualBox
VirtualBox : Cloning a virtual hard disk
If you’ve got a VirtualBox VM already installed and you wish to clone/copy it, follow the steps below :
Linux : Configuring a network bridge for your Virtual Machines
My new center of interest those days being virtualization, I tried quite a few software starting with Xen, then QEMU, then KVM, and finally VirtualBox. But as far as giving a network access to the VM is concerned, I’ve always sticked to a network bridge for the reason that this makes the VM appear on the network just like any other computer of your network.
This post provided a sample script to setup a bridge suitable to use with all of the named virtualization softwares.
Tag: Virtualization
VirtualBox : Cloning a virtual hard disk
If you’ve got a VirtualBox VM already installed and you wish to clone/copy it, follow the steps below :
Linux : Configuring a network bridge for your Virtual Machines
My new center of interest those days being virtualization, I tried quite a few software starting with Xen, then QEMU, then KVM, and finally VirtualBox. But as far as giving a network access to the VM is concerned, I’ve always sticked to a network bridge for the reason that this makes the VM appear on the network just like any other computer of your network.
This post provided a sample script to setup a bridge suitable to use with all of the named virtualization softwares.
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: Vm
VirtualBox : Cloning a virtual hard disk
If you’ve got a VirtualBox VM already installed and you wish to clone/copy it, follow the steps below :
Tag: Cifs
OpenSolaris : Exporting a ZFS filesystem with CIFS
If you need to export ZFS volumes through CIFS, follow this simple step by step procedure.
Tag: Opensolaris
OpenSolaris : Exporting a ZFS filesystem with CIFS
If you need to export ZFS volumes through CIFS, follow this simple step by step procedure.
OpenSolaris : Switching to the /dev development branch
In OpenSolaris, switching to the /dev development branch is a bit like switching to the testing branch for some linux distros. So you might want to think twice before doing so, as it might sometimes break things.
If you still want to do that, follow those instructions :
OpenSolaris 2008.05 released today
OpenSolaris 2008.05 is released today, you can grab it from the OpenSolaris website.
The distribution is a bootable CD which will let you try it before installing. It includes most of the big hits of Solaris 10 (zfs, dtrace, containers and so on).
If you never tried Solaris or OpenSolaris, this might be a good kick start !
Tag: Samba
OpenSolaris : Exporting a ZFS filesystem with CIFS
If you need to export ZFS volumes through CIFS, follow this simple step by step procedure.
Tag: Zfs
OpenSolaris : Exporting a ZFS filesystem with CIFS
If you need to export ZFS volumes through CIFS, follow this simple step by step procedure.
Backups : a personnal implementation
If you’ve been following my blog for a while, you might have seen posts about SSH, RSYNC, ZFS Snapshots and so on. This article aims at describing the big picture, and to explain how I’ve been using those tools and technologies to build my own home backup system.
Sun Solaris 10 : Creating snapshots with ZFS
ZFS is a great filesystem. Amongst its many features, it has snapshots. Let’s see how to use them.
Tag: Dev Branch
OpenSolaris : Switching to the /dev development branch
In OpenSolaris, switching to the /dev development branch is a bit like switching to the testing branch for some linux distros. So you might want to think twice before doing so, as it might sometimes break things.
If you still want to do that, follow those instructions :
Tag: 3d
Gentoo : Xorg X Server 3D hardware acceleration
You need to have read/write permissions to /dev/dri/cardX to benefit from 3D hardware acceleration in Xorg X Server. On a Gentoo linux machine, this file has the following permissions set by default :
ls -l /dev/dri/card0
crw-rw---- 1 root video 226, 0 2009-10-14 16:12 /dev/dri/card0
Tag: Acceleration
Gentoo : Xorg X Server 3D hardware acceleration
You need to have read/write permissions to /dev/dri/cardX to benefit from 3D hardware acceleration in Xorg X Server. On a Gentoo linux machine, this file has the following permissions set by default :
ls -l /dev/dri/card0
crw-rw---- 1 root video 226, 0 2009-10-14 16:12 /dev/dri/card0
Tag: ATI
Gentoo : Xorg X Server 3D hardware acceleration
You need to have read/write permissions to /dev/dri/cardX to benefit from 3D hardware acceleration in Xorg X Server. On a Gentoo linux machine, this file has the following permissions set by default :
ls -l /dev/dri/card0
crw-rw---- 1 root video 226, 0 2009-10-14 16:12 /dev/dri/card0
Tag: Cacti
Gentoo : Running Cacti with LigHTTPD
If you use Gentoo and tried to install Cacti with Lighttpd instead of Apache, chances are that you ran into this error message :
/usr/lib/python2.6/site-packages/WebappConfig/content.py:27: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5, re, os, os.path
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=www-servers/apache-1.3" or correct your settings.
* Fatal error(s) - aborting
Tag: Lighttpd
Gentoo : Running Cacti with LigHTTPD
If you use Gentoo and tried to install Cacti with Lighttpd instead of Apache, chances are that you ran into this error message :
/usr/lib/python2.6/site-packages/WebappConfig/content.py:27: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5, re, os, os.path
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=www-servers/apache-1.3" or correct your settings.
* Fatal error(s) - aborting
Tag: Php
Gentoo : Running Cacti with LigHTTPD
If you use Gentoo and tried to install Cacti with Lighttpd instead of Apache, chances are that you ran into this error message :
/usr/lib/python2.6/site-packages/WebappConfig/content.py:27: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5, re, os, os.path
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=www-servers/apache-1.3" or correct your settings.
* Fatal error(s) - aborting
Tag: Bittorrent
rTorrent : Probing downloads status through XML-RPC
rTorrent is a very efficient BitTorrent client for linux. It has a very small memory footprint, a very customizable configuration file, and exposes it’s internals through XML-RPC. This is convenient to implement 3rd party GUI or web interfaces.
Let’s see how to setup and use XML-RPC to probe rTorrent downloads.
Tag: RTorrent
rTorrent : Probing downloads status through XML-RPC
rTorrent is a very efficient BitTorrent client for linux. It has a very small memory footprint, a very customizable configuration file, and exposes it’s internals through XML-RPC. This is convenient to implement 3rd party GUI or web interfaces.
Let’s see how to setup and use XML-RPC to probe rTorrent downloads.
Tag: Xmlrpc
rTorrent : Probing downloads status through XML-RPC
rTorrent is a very efficient BitTorrent client for linux. It has a very small memory footprint, a very customizable configuration file, and exposes it’s internals through XML-RPC. This is convenient to implement 3rd party GUI or web interfaces.
Let’s see how to setup and use XML-RPC to probe rTorrent downloads.
Tag: Modeline
VIM: using the modeline for file based customized editing parameters
The “modeline” is a common way to set (or override) VIM settings on a file by file basis. Let’s see a few of the key concepts of the VIM modeline.
Tag: Vim
VIM: using the modeline for file based customized editing parameters
The “modeline” is a common way to set (or override) VIM settings on a file by file basis. Let’s see a few of the key concepts of the VIM modeline.
Tag: Hotplug
Linux : SATA hot plug / unplug
I have 3 hard disks in SATA-to-eSATA external enclosure which I occasionally need to plug to perform backups and to unplug when done. I found it annoying to have to restart the whole computer at every turn, especially when SATA is supposed to bring hotplug abilities. If you mainboard / SATA chipset and disks support hot plugging and unplugging, you can do this by following those instructions.
Tag: Sata
Linux : SATA hot plug / unplug
I have 3 hard disks in SATA-to-eSATA external enclosure which I occasionally need to plug to perform backups and to unplug when done. I found it annoying to have to restart the whole computer at every turn, especially when SATA is supposed to bring hotplug abilities. If you mainboard / SATA chipset and disks support hot plugging and unplugging, you can do this by following those instructions.
Tag: Openssh
SSH : Multiplexing connections
There is a feature in OpenSSH since v3.9 which allows multiple SSH connections with the same caracteristics (host, port, remote login) to be made through a single TCP connection. This is useful because you’ll have to authenticate only once, and besides the new SSH connections will be much faster to establish.
OpenBSD : Give money !!
not to me !! 😀
The OpenBSD project needs money to hold its events (such as hackaton, where developpers gather to implement features, or usual running costs).
If you think you don’t use OpenBSD, think again ! The project OpenSSH, which implements a free, and secure SSH implementation, comes from OpenBSD. It is widely used in many OSes and appliances …
We need OpenBSD !! Don’t hesitate to make a donation !
The original post
The OpenBSD project
The OpenSSH sister project
Tag: Ssh
SSH : Multiplexing connections
There is a feature in OpenSSH since v3.9 which allows multiple SSH connections with the same caracteristics (host, port, remote login) to be made through a single TCP connection. This is useful because you’ll have to authenticate only once, and besides the new SSH connections will be much faster to establish.
Backups : a personnal implementation
If you’ve been following my blog for a while, you might have seen posts about SSH, RSYNC, ZFS Snapshots and so on. This article aims at describing the big picture, and to explain how I’ve been using those tools and technologies to build my own home backup system.
Securing automated rsync over SSH
Quoting the RSYNC homepage : “rsync is an open source utility that provides fast incremental file transfer.”
To make rsync both secure and automated (i.e : non-interactive), you can use SSH as the transport and set up a key pair. This is what will be discussed in this post, along with a few improvements.
SSH slow to connect to a Solaris 10 host
If you experience a slow SSH connection to a Solaris 10 host while after connection everything works fine, then read on !
Tag: KVM
Linux : Configuring a network bridge for your Virtual Machines
My new center of interest those days being virtualization, I tried quite a few software starting with Xen, then QEMU, then KVM, and finally VirtualBox. But as far as giving a network access to the VM is concerned, I’ve always sticked to a network bridge for the reason that this makes the VM appear on the network just like any other computer of your network.
This post provided a sample script to setup a bridge suitable to use with all of the named virtualization softwares.
Tag: Networking
Linux : Configuring a network bridge for your Virtual Machines
My new center of interest those days being virtualization, I tried quite a few software starting with Xen, then QEMU, then KVM, and finally VirtualBox. But as far as giving a network access to the VM is concerned, I’ve always sticked to a network bridge for the reason that this makes the VM appear on the network just like any other computer of your network.
This post provided a sample script to setup a bridge suitable to use with all of the named virtualization softwares.
Network Security : Being the Man In The Middle using ARP
This post presents what is the attack known as “ARP Man in the Middle” which is basically a way for a malicious user to sniff network traffic on a fully switched network. If you don’t know this attack yet, go on reading.
VLAN + OpenBSD : a simple configuration
This posts gives a short intro about VLAN and a simple configuration sample on a DELL PowerConnect 5224 switch with an OpenBSD machine.
Tag: QEMU
Linux : Configuring a network bridge for your Virtual Machines
My new center of interest those days being virtualization, I tried quite a few software starting with Xen, then QEMU, then KVM, and finally VirtualBox. But as far as giving a network access to the VM is concerned, I’ve always sticked to a network bridge for the reason that this makes the VM appear on the network just like any other computer of your network.
This post provided a sample script to setup a bridge suitable to use with all of the named virtualization softwares.
Tag: Xen
Linux : Configuring a network bridge for your Virtual Machines
My new center of interest those days being virtualization, I tried quite a few software starting with Xen, then QEMU, then KVM, and finally VirtualBox. But as far as giving a network access to the VM is concerned, I’ve always sticked to a network bridge for the reason that this makes the VM appear on the network just like any other computer of your network.
This post provided a sample script to setup a bridge suitable to use with all of the named virtualization softwares.
Xen : OpenSolaris 2008.11 DomU running on a Linux Dom0
This post is a step by step explanation about how to get an OpenSolaris 2008.11 run as a Xen DomU on a Linux Dom0.
To follow this, you’ll need a Linux machine ready for Xen (I run Xen 3.3.0), with vncviewer installed.
This post doesn’t explain the basics of Xen, so you might want to start by learning Xen if you don’t already know a bit of it.
Ubuntu 8.04.1 : Xen 3.2 package broken ?
I’m trying to install xen on Ubuntu 8.04.1 and here is what I get :
spaghetti% sudo apt-get install ubuntu-xen-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ubuntu-xen-server: Depends: python-xen-3.2 but it is not going to be installed
Depends: xen-utils-3.2 but it is not going to be installed
E: Broken packages
spaghetti%
I’ve tried to follow the package dependencies but without success. As for now I’m growing tired of Ubuntu and I’m considering moving away to a more robust distribution … I’d be glad to hear your point of view about that too.
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: D-Bus
D-Bus introduction in Perl
As stated in Wikipedia :
D-Bus (Desktop Bus) is a simple inter-process communication (IPC) system for software applications to communicate with one another.
This post provides a simple code snippet in Perl to help you getting started with D-Bus programming.
Tag: Intro
D-Bus introduction in Perl
As stated in Wikipedia :
D-Bus (Desktop Bus) is a simple inter-process communication (IPC) system for software applications to communicate with one another.
This post provides a simple code snippet in Perl to help you getting started with D-Bus programming.
Tag: Pidgin
D-Bus introduction in Perl
As stated in Wikipedia :
D-Bus (Desktop Bus) is a simple inter-process communication (IPC) system for software applications to communicate with one another.
This post provides a simple code snippet in Perl to help you getting started with D-Bus programming.
Tag: Amarok
Linux + Amarok 1.4 : Setting up proxy configuration
If you access the internet through a proxy, you need to set up Amarok to use it to enjoy some of its amazing features such as automatic downloading of CD covers or fetching of the lyrics of the song you’re listenning to. Amarok is really a great media player. if you don’t know it you should definitely give it a try !
Setting up proxy parameters for Amarok 1.4 could be a little confusing if you don’t use the full KDE environment. In this post, I’ll explain how to manually edit KDE configuration files to fix proxy settings.
Tag: Kde
Linux + Amarok 1.4 : Setting up proxy configuration
If you access the internet through a proxy, you need to set up Amarok to use it to enjoy some of its amazing features such as automatic downloading of CD covers or fetching of the lyrics of the song you’re listenning to. Amarok is really a great media player. if you don’t know it you should definitely give it a try !
Setting up proxy parameters for Amarok 1.4 could be a little confusing if you don’t use the full KDE environment. In this post, I’ll explain how to manually edit KDE configuration files to fix proxy settings.
Tag: Proxy
Linux + Amarok 1.4 : Setting up proxy configuration
If you access the internet through a proxy, you need to set up Amarok to use it to enjoy some of its amazing features such as automatic downloading of CD covers or fetching of the lyrics of the song you’re listenning to. Amarok is really a great media player. if you don’t know it you should definitely give it a try !
Setting up proxy parameters for Amarok 1.4 could be a little confusing if you don’t use the full KDE environment. In this post, I’ll explain how to manually edit KDE configuration files to fix proxy settings.
Tag: Solaris
Xen : OpenSolaris 2008.11 DomU running on a Linux Dom0
This post is a step by step explanation about how to get an OpenSolaris 2008.11 run as a Xen DomU on a Linux Dom0.
To follow this, you’ll need a Linux machine ready for Xen (I run Xen 3.3.0), with vncviewer installed.
This post doesn’t explain the basics of Xen, so you might want to start by learning Xen if you don’t already know a bit of it.
Backups : a personnal implementation
If you’ve been following my blog for a while, you might have seen posts about SSH, RSYNC, ZFS Snapshots and so on. This article aims at describing the big picture, and to explain how I’ve been using those tools and technologies to build my own home backup system.
Sun Solaris 10 : Creating snapshots with ZFS
ZFS is a great filesystem. Amongst its many features, it has snapshots. Let’s see how to use them.
OpenSolaris 2008.05 released today
OpenSolaris 2008.05 is released today, you can grab it from the OpenSolaris website.
The distribution is a bootable CD which will let you try it before installing. It includes most of the big hits of Solaris 10 (zfs, dtrace, containers and so on).
If you never tried Solaris or OpenSolaris, this might be a good kick start !
SSH slow to connect to a Solaris 10 host
If you experience a slow SSH connection to a Solaris 10 host while after connection everything works fine, then read on !
Solaris 10: On which CD is that XYZ package ?
If you want to know on which CD is a package, without :
- Mounting CD
- Searching
- Unmounting
- Swear and
- Go back to 1
Then you can :
- Mount CD #1 (mount -F hsfs /dev/dsk/
/mnt or, if you have automount cd /cdrom/cdrom0 or something like that) - Go in the Solaris_10/Product directory of the CD
- Do grep -l
.virtual_packagetoc_* which will output the .virtual_packagetoc_N where N is the number of the CD holding that package.
Exemple :
Tag: Broken Symlinks
shell tip : identify broken symlinks
If you need to identify broken symlinks, you can do the following :
find -L . -type l
The -L options instructs find to follow symlinks when possible. Hence no “working symlink” will ever get returned as the targets won’t match -type l (meaning “file is a symlink”).
On the other hand, find will not be able to follow broken symlinks, so the information will be taken from the symlink itself and not from the non-existent or otherwise unreachable target. The -type l will then be a match and the broken symlink filename will be returned.
Tag: System
Gentoo : Managing software packages
In this post I’ll cover the basics one needs to know to install, upgrade and remove packages on a Gentoo linux system.
Tag: Emerge
Gentoo : First thoughts after the switch
I’ve recently switched to the Gentoo Linux distribution (mostly to experiment with this Linux distro) and I don’t regret it so far. This post is about my first impressions about Gentoo.
Tag: Ubuntu
Ubuntu 8.04.1 : Xen 3.2 package broken ?
I’m trying to install xen on Ubuntu 8.04.1 and here is what I get :
spaghetti% sudo apt-get install ubuntu-xen-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ubuntu-xen-server: Depends: python-xen-3.2 but it is not going to be installed
Depends: xen-utils-3.2 but it is not going to be installed
E: Broken packages
spaghetti%
I’ve tried to follow the package dependencies but without success. As for now I’m growing tired of Ubuntu and I’m considering moving away to a more robust distribution … I’d be glad to hear your point of view about that too.
Ubuntu 8.04 + IBM T40 = No sound
If you upgraded your Ubuntu on an IBM T40 Laptop only to find out that there is no sound anymore, you’re not alone in this 😉
Follow the bug report for more information !
Edit 2008-05-11 : As of today I don’t have this problem anymore … update your machine if you haven’t yet !
Edit 2008-06-22 : Sound vanished again … I really need to look into this before this drives me crazy !!
Tag: Randy Pausch
RIP Randy Pausch
I barely knew the guy but the news that he passed away is all around the blogoshpere. If you have 76 minutes to spare, have a look at his Last Lecture at the Carnegie Mellon University, it’s really worth it (I won’t comment on it since it is already widely commented everywhere else). Man, I wish I had this kind of teacher; he seemed to have been the kind of life changing one !
Tag: Rip
RIP Randy Pausch
I barely knew the guy but the news that he passed away is all around the blogoshpere. If you have 76 minutes to spare, have a look at his Last Lecture at the Carnegie Mellon University, it’s really worth it (I won’t comment on it since it is already widely commented everywhere else). Man, I wish I had this kind of teacher; he seemed to have been the kind of life changing one !
Tag: Exports
NFS : see what’s exported from an NFS server
To know what directories are exported by a NFS server, you can use the showmount -e nfs_server from a NFS client.
[root@client:~]# showmount -e server<br /> Export list for server:<br /> /data/dir1 (everyone)<br /> /data/dir2 client1 client2 client3
(The /data/dir2 is exported only to specified clients)
Tag: Nfs
NFS : see what’s exported from an NFS server
To know what directories are exported by a NFS server, you can use the showmount -e nfs_server from a NFS client.
[root@client:~]# showmount -e server<br /> Export list for server:<br /> /data/dir1 (everyone)<br /> /data/dir2 client1 client2 client3
(The /data/dir2 is exported only to specified clients)
Tag: Apache
Web server optimizations : ETAGs
This is nothing new, but just in case you missed it, Yahoo! published a fairly detailed report about how to speed up your website response times : Best Practices for Speeding Up Your Web Site.
Many of the tips are common sense, some are somehow unexpected, and some I didn’t know like the HTTP/1.1 header ETAG. Let’s see what that’s about.
Tag: Cache
Web server optimizations : ETAGs
This is nothing new, but just in case you missed it, Yahoo! published a fairly detailed report about how to speed up your website response times : Best Practices for Speeding Up Your Web Site.
Many of the tips are common sense, some are somehow unexpected, and some I didn’t know like the HTTP/1.1 header ETAG. Let’s see what that’s about.
Tag: Etag
Web server optimizations : ETAGs
This is nothing new, but just in case you missed it, Yahoo! published a fairly detailed report about how to speed up your website response times : Best Practices for Speeding Up Your Web Site.
Many of the tips are common sense, some are somehow unexpected, and some I didn’t know like the HTTP/1.1 header ETAG. Let’s see what that’s about.
Tag: Http
Web server optimizations : ETAGs
This is nothing new, but just in case you missed it, Yahoo! published a fairly detailed report about how to speed up your website response times : Best Practices for Speeding Up Your Web Site.
Many of the tips are common sense, some are somehow unexpected, and some I didn’t know like the HTTP/1.1 header ETAG. Let’s see what that’s about.
Tag: Httpd
Web server optimizations : ETAGs
This is nothing new, but just in case you missed it, Yahoo! published a fairly detailed report about how to speed up your website response times : Best Practices for Speeding Up Your Web Site.
Many of the tips are common sense, some are somehow unexpected, and some I didn’t know like the HTTP/1.1 header ETAG. Let’s see what that’s about.
Tag: Webserver
Web server optimizations : ETAGs
This is nothing new, but just in case you missed it, Yahoo! published a fairly detailed report about how to speed up your website response times : Best Practices for Speeding Up Your Web Site.
Many of the tips are common sense, some are somehow unexpected, and some I didn’t know like the HTTP/1.1 header ETAG. Let’s see what that’s about.
Tag: Backups
Backups : a personnal implementation
If you’ve been following my blog for a while, you might have seen posts about SSH, RSYNC, ZFS Snapshots and so on. This article aims at describing the big picture, and to explain how I’ve been using those tools and technologies to build my own home backup system.
Tag: Rsync
Backups : a personnal implementation
If you’ve been following my blog for a while, you might have seen posts about SSH, RSYNC, ZFS Snapshots and so on. This article aims at describing the big picture, and to explain how I’ve been using those tools and technologies to build my own home backup system.
Securing automated rsync over SSH
Quoting the RSYNC homepage : “rsync is an open source utility that provides fast incremental file transfer.”
To make rsync both secure and automated (i.e : non-interactive), you can use SSH as the transport and set up a key pair. This is what will be discussed in this post, along with a few improvements.
Tag: Movies
Movie Review : “Outsourced”, 2007
I don’t usually comment movies on my blog because this is really not the point, but I’ve just seen “Outsourced
” and it literally cracked me up, so I decided to make a short exception 😉 (Besides I’ve already thought of a good excuse you’ll find out later in this post)
Tag: Outsourced
Movie Review : “Outsourced”, 2007
I don’t usually comment movies on my blog because this is really not the point, but I’ve just seen “Outsourced
” and it literally cracked me up, so I decided to make a short exception 😉 (Besides I’ve already thought of a good excuse you’ll find out later in this post)
Tag: Reviews
Movie Review : “Outsourced”, 2007
I don’t usually comment movies on my blog because this is really not the point, but I’ve just seen “Outsourced
” and it literally cracked me up, so I decided to make a short exception 😉 (Besides I’ve already thought of a good excuse you’ll find out later in this post)
Tag: Copy on Write
Sun Solaris 10 : Creating snapshots with ZFS
ZFS is a great filesystem. Amongst its many features, it has snapshots. Let’s see how to use them.
Tag: COW
Sun Solaris 10 : Creating snapshots with ZFS
ZFS is a great filesystem. Amongst its many features, it has snapshots. Let’s see how to use them.
Tag: Snapshots
Sun Solaris 10 : Creating snapshots with ZFS
ZFS is a great filesystem. Amongst its many features, it has snapshots. Let’s see how to use them.
Tag: Authorized_keys
Securing automated rsync over SSH
Quoting the RSYNC homepage : “rsync is an open source utility that provides fast incremental file transfer.”
To make rsync both secure and automated (i.e : non-interactive), you can use SSH as the transport and set up a key pair. This is what will be discussed in this post, along with a few improvements.
Tag: Security
Securing automated rsync over SSH
Quoting the RSYNC homepage : “rsync is an open source utility that provides fast incremental file transfer.”
To make rsync both secure and automated (i.e : non-interactive), you can use SSH as the transport and set up a key pair. This is what will be discussed in this post, along with a few improvements.
Network Security : Being the Man In The Middle using ARP
This post presents what is the attack known as “ARP Man in the Middle” which is basically a way for a malicious user to sniff network traffic on a fully switched network. If you don’t know this attack yet, go on reading.
MSN : get rid of Backdoor.Generic3.SAT
If you got this virus (or know someone who did), and it is spreading to all of your MSN contacts with something like the following message :
hey How are you???? this is ur pic rite?!<br /> http://www.msn- gallery.com/gallery.php?user=some_nickname.jpg
or in French something like :
http://msn-friends. iquebec.com/?photo=some_nickname<br /> ta tof fais koi sur ce site :P
Then you can use the following article (there is a removal tool) to get rid of it : How to Remove MSN Virus Project 1/ Generic2.EXO / Backdoor.Generic3.SAT
Web Security : What are XSS?
XSS (Cross Site Scripting) are a kind of attacks which are fairly popular these days and could target anyone, but are not nearly well known from most people.
In this post, I’ll try to give a short explanation of what they are.
Tag: Troubleshooting
SSH slow to connect to a Solaris 10 host
If you experience a slow SSH connection to a Solaris 10 host while after connection everything works fine, then read on !
Tag: Bug
Ubuntu 8.04 + IBM T40 = No sound
If you upgraded your Ubuntu on an IBM T40 Laptop only to find out that there is no sound anymore, you’re not alone in this 😉
Follow the bug report for more information !
Edit 2008-05-11 : As of today I don’t have this problem anymore … update your machine if you haven’t yet !
Edit 2008-06-22 : Sound vanished again … I really need to look into this before this drives me crazy !!
Tag: Ibm T40
Ubuntu 8.04 + IBM T40 = No sound
If you upgraded your Ubuntu on an IBM T40 Laptop only to find out that there is no sound anymore, you’re not alone in this 😉
Follow the bug report for more information !
Edit 2008-05-11 : As of today I don’t have this problem anymore … update your machine if you haven’t yet !
Edit 2008-06-22 : Sound vanished again … I really need to look into this before this drives me crazy !!
Tag: Laptop
Ubuntu 8.04 + IBM T40 = No sound
If you upgraded your Ubuntu on an IBM T40 Laptop only to find out that there is no sound anymore, you’re not alone in this 😉
Follow the bug report for more information !
Edit 2008-05-11 : As of today I don’t have this problem anymore … update your machine if you haven’t yet !
Edit 2008-06-22 : Sound vanished again … I really need to look into this before this drives me crazy !!
Tag: Arp
Network Security : Being the Man In The Middle using ARP
This post presents what is the attack known as “ARP Man in the Middle” which is basically a way for a malicious user to sniff network traffic on a fully switched network. If you don’t know this attack yet, go on reading.
Tag: Hacking
Network Security : Being the Man In The Middle using ARP
This post presents what is the attack known as “ARP Man in the Middle” which is basically a way for a malicious user to sniff network traffic on a fully switched network. If you don’t know this attack yet, go on reading.
Tag: Man in the Middle
Network Security : Being the Man In The Middle using ARP
This post presents what is the attack known as “ARP Man in the Middle” which is basically a way for a malicious user to sniff network traffic on a fully switched network. If you don’t know this attack yet, go on reading.
Tag: Vlan
VLAN + OpenBSD : a simple configuration
This posts gives a short intro about VLAN and a simple configuration sample on a DELL PowerConnect 5224 switch with an OpenBSD machine.
Tag: 5224
Dell PowerConnect switches – Password recovery procedure
If you are looking for a procedure to reset the password of a Dell PowerConnect switch, you’ll find it at the Dell support forum in the following thread : PowerConnect Password Recovery Procedure for managed switches.
As far as the 5224 is concerned, you mostly have to hold Ctrl-F from the power-on till the end of the boot of the switch, which will bring the “reset to factory ?” question and solve the problem of the lost password.
Tag: Dell
Dell PowerConnect switches – Password recovery procedure
If you are looking for a procedure to reset the password of a Dell PowerConnect switch, you’ll find it at the Dell support forum in the following thread : PowerConnect Password Recovery Procedure for managed switches.
As far as the 5224 is concerned, you mostly have to hold Ctrl-F from the power-on till the end of the boot of the switch, which will bring the “reset to factory ?” question and solve the problem of the lost password.
Tag: Factory Settings
Dell PowerConnect switches – Password recovery procedure
If you are looking for a procedure to reset the password of a Dell PowerConnect switch, you’ll find it at the Dell support forum in the following thread : PowerConnect Password Recovery Procedure for managed switches.
As far as the 5224 is concerned, you mostly have to hold Ctrl-F from the power-on till the end of the boot of the switch, which will bring the “reset to factory ?” question and solve the problem of the lost password.
Tag: PowerConnect
Dell PowerConnect switches – Password recovery procedure
If you are looking for a procedure to reset the password of a Dell PowerConnect switch, you’ll find it at the Dell support forum in the following thread : PowerConnect Password Recovery Procedure for managed switches.
As far as the 5224 is concerned, you mostly have to hold Ctrl-F from the power-on till the end of the boot of the switch, which will bring the “reset to factory ?” question and solve the problem of the lost password.
Tag: Recover Password
Dell PowerConnect switches – Password recovery procedure
If you are looking for a procedure to reset the password of a Dell PowerConnect switch, you’ll find it at the Dell support forum in the following thread : PowerConnect Password Recovery Procedure for managed switches.
As far as the 5224 is concerned, you mostly have to hold Ctrl-F from the power-on till the end of the boot of the switch, which will bring the “reset to factory ?” question and solve the problem of the lost password.
Tag: Switch
Dell PowerConnect switches – Password recovery procedure
If you are looking for a procedure to reset the password of a Dell PowerConnect switch, you’ll find it at the Dell support forum in the following thread : PowerConnect Password Recovery Procedure for managed switches.
As far as the 5224 is concerned, you mostly have to hold Ctrl-F from the power-on till the end of the boot of the switch, which will bring the “reset to factory ?” question and solve the problem of the lost password.
Tag: Binary Logs
MySQL : binary log files
MySQL uses the so called binary log files to implement master/slaves replication.
Tag: Mysql
MySQL : binary log files
MySQL uses the so called binary log files to implement master/slaves replication.
Tag: Replication
MySQL : binary log files
MySQL uses the so called binary log files to implement master/slaves replication.
Tag: Cfengine
CFEngine : Checking for processes
CFEngine can do wonders to keep a cluster in shape, but it can be very useful for a single server as well. Here is a configuration sample to monitor a few common services and restart them should they fail.
CFEngine – Installing on Debian GNU/Linux
In this post we’ll install CFEngine on a Debian system. Debian make is really simple to install any packages, so let’s follow the “standard” package installation procedure (I’ll assume that apt is correctly setup on your system ! If you have troubles with it, let me know, I’ll write a post on this topic).
CFEngine – What is it ?
CFEngine is a configuration management engine. I’m going to write a series of short posts as I’m going to use CFEngine in a current project. Let’s start with a short description of CFEngine purpose and main features.
Keeping track of changes with cfengine and SubVersioN
Cfengine is a tool which purpose is to describe what is a healthy system and how to bring it back to normal when something fails.
I won’t go into an explanation about how cfengine works, because the project webpage already has a neat tutorial and complete reference. Instead of that, I’ll explain how I used cfengine to build a fool proof Linux firewall.
Tag: Cluster
CFEngine : Checking for processes
CFEngine can do wonders to keep a cluster in shape, but it can be very useful for a single server as well. Here is a configuration sample to monitor a few common services and restart them should they fail.
dsh : a distributed shell
A common problem when you deal with a pool of servers (clusters or server farms, you name it) is to execute the same command line on each server. It is usual to solve this with a “for” construct such as :
for i in server1 server2 ; do ssh $i "uname -a"; done
But this is basically re-inventing the wheel everytime. Here comes Distributed Shell (DSH).
CFEngine – Installing on Debian GNU/Linux
In this post we’ll install CFEngine on a Debian system. Debian make is really simple to install any packages, so let’s follow the “standard” package installation procedure (I’ll assume that apt is correctly setup on your system ! If you have troubles with it, let me know, I’ll write a post on this topic).
CFEngine – What is it ?
CFEngine is a configuration management engine. I’m going to write a series of short posts as I’m going to use CFEngine in a current project. Let’s start with a short description of CFEngine purpose and main features.
Keeping track of changes with cfengine and SubVersioN
Cfengine is a tool which purpose is to describe what is a healthy system and how to bring it back to normal when something fails.
I won’t go into an explanation about how cfengine works, because the project webpage already has a neat tutorial and complete reference. Instead of that, I’ll explain how I used cfengine to build a fool proof Linux firewall.
Tag: Blog
WordPress : Error while auto-saving, saving, commenting
If you got the following error in WordPress when saving, auto-saving, or commenting on a post :
Warning: fsockopen() [function.fsockopen]: unable to connect to submissions.ask.com:80 in /path/to/blog/wp-includes/class-snoopy.php on line 1150
then keep reading 😉
Tag: Error
WordPress : Error while auto-saving, saving, commenting
If you got the following error in WordPress when saving, auto-saving, or commenting on a post :
Warning: fsockopen() [function.fsockopen]: unable to connect to submissions.ask.com:80 in /path/to/blog/wp-includes/class-snoopy.php on line 1150
then keep reading 😉
Tag: Wordpress
WordPress : Error while auto-saving, saving, commenting
If you got the following error in WordPress when saving, auto-saving, or commenting on a post :
Warning: fsockopen() [function.fsockopen]: unable to connect to submissions.ask.com:80 in /path/to/blog/wp-includes/class-snoopy.php on line 1150
then keep reading 😉
WordPress : Delayed posts
A cool feature of WordPress I’ve just discovered : delayed posts.
Tag: Xml Sitemap
WordPress : Error while auto-saving, saving, commenting
If you got the following error in WordPress when saving, auto-saving, or commenting on a post :
Warning: fsockopen() [function.fsockopen]: unable to connect to submissions.ask.com:80 in /path/to/blog/wp-includes/class-snoopy.php on line 1150
then keep reading 😉
Tag: Delayed Posts
WordPress : Delayed posts
A cool feature of WordPress I’ve just discovered : delayed posts.
Tag: Trick
WordPress : Delayed posts
A cool feature of WordPress I’ve just discovered : delayed posts.
Tag: Wordpress 2.5
Upgrading to WordPress 2.5
As you might have noticed, WordPress 2.5 is out, so I’ve just upgraded this blog.
Till now all I can tell is that the admin interface has changed a bit. Oh and there is a system to upgrade plugins with one click, which is way cool. Otherwise pretty much the same good old WordPress.
The upgrade went smoothly, just as for any other previous release and everything seems to be running just fine. However, at the first glance, the blog seems a bit slower than before the upgrade … (maybe this is not related to the upgrade … I’ll have to check this out).
Tag: Heyu
X10 Home automation : Heyu a tool for managing a CM11
I currently manage all my X10 home automation with MisterHouse which is a fantastic tool but is a bit on the heavyweight side. Plus you need to know a bit of Perl to take full advantage of it.
If you are looking for something simpler to use, you might want to consider HEYU.
Tag: X10
X10 Home automation : Heyu a tool for managing a CM11
I currently manage all my X10 home automation with MisterHouse which is a fantastic tool but is a bit on the heavyweight side. Plus you need to know a bit of Perl to take full advantage of it.
If you are looking for something simpler to use, you might want to consider HEYU.
Tag: Backdoor.Generic3.SAT
MSN : get rid of Backdoor.Generic3.SAT
If you got this virus (or know someone who did), and it is spreading to all of your MSN contacts with something like the following message :
hey How are you???? this is ur pic rite?!<br /> http://www.msn- gallery.com/gallery.php?user=some_nickname.jpg
or in French something like :
http://msn-friends. iquebec.com/?photo=some_nickname<br /> ta tof fais koi sur ce site :P
Then you can use the following article (there is a removal tool) to get rid of it : How to Remove MSN Virus Project 1/ Generic2.EXO / Backdoor.Generic3.SAT
Tag: Msn
MSN : get rid of Backdoor.Generic3.SAT
If you got this virus (or know someone who did), and it is spreading to all of your MSN contacts with something like the following message :
hey How are you???? this is ur pic rite?!<br /> http://www.msn- gallery.com/gallery.php?user=some_nickname.jpg
or in French something like :
http://msn-friends. iquebec.com/?photo=some_nickname<br /> ta tof fais koi sur ce site :P
Then you can use the following article (there is a removal tool) to get rid of it : How to Remove MSN Virus Project 1/ Generic2.EXO / Backdoor.Generic3.SAT
Tag: Virus
MSN : get rid of Backdoor.Generic3.SAT
If you got this virus (or know someone who did), and it is spreading to all of your MSN contacts with something like the following message :
hey How are you???? this is ur pic rite?!<br /> http://www.msn- gallery.com/gallery.php?user=some_nickname.jpg
or in French something like :
http://msn-friends. iquebec.com/?photo=some_nickname<br /> ta tof fais koi sur ce site :P
Then you can use the following article (there is a removal tool) to get rid of it : How to Remove MSN Virus Project 1/ Generic2.EXO / Backdoor.Generic3.SAT
Tag: Datacenter
dsh : a distributed shell
A common problem when you deal with a pool of servers (clusters or server farms, you name it) is to execute the same command line on each server. It is usual to solve this with a “for” construct such as :
for i in server1 server2 ; do ssh $i "uname -a"; done
But this is basically re-inventing the wheel everytime. Here comes Distributed Shell (DSH).
Tag: Distributed Shell
dsh : a distributed shell
A common problem when you deal with a pool of servers (clusters or server farms, you name it) is to execute the same command line on each server. It is usual to solve this with a “for” construct such as :
for i in server1 server2 ; do ssh $i "uname -a"; done
But this is basically re-inventing the wheel everytime. Here comes Distributed Shell (DSH).
Tag: Dsh
dsh : a distributed shell
A common problem when you deal with a pool of servers (clusters or server farms, you name it) is to execute the same command line on each server. It is usual to solve this with a “for” construct such as :
for i in server1 server2 ; do ssh $i "uname -a"; done
But this is basically re-inventing the wheel everytime. Here comes Distributed Shell (DSH).
Tag: Cluster Suite
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: Clustering
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: GFS
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: GNBD
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: Load Balancing
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: LVS
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: Piranha
Linux : Clusters, Vitualization, High Availability, Load balancing
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Tag: Epoch
Perl : Convert time from Epoch to local time

This little Perl one-liner can get handy when you need to translate “time in seconds since the Epoch” (for example in logs) to local time :
% perl -e 'print scalar(localtime(1202484725)), "\n";'<br /> Fri Feb 8 16:32:05 2008<br /> %
This was pretty useful today when browsing through Nagios event logs, where times are given in seconds from the Epoch.
By the way, the Epoch is defined as 00:00 UTC on January, 1st, 1970.
Tag: Localtime
Perl : Convert time from Epoch to local time

This little Perl one-liner can get handy when you need to translate “time in seconds since the Epoch” (for example in logs) to local time :
% perl -e 'print scalar(localtime(1202484725)), "\n";'<br /> Fri Feb 8 16:32:05 2008<br /> %
This was pretty useful today when browsing through Nagios event logs, where times are given in seconds from the Epoch.
By the way, the Epoch is defined as 00:00 UTC on January, 1st, 1970.
Tag: CAB
ITIL: What is the CAB ?
ITIL Methodology advises that every RFC (Request For Change) be run through the CAB (Change Advisory Board).
What’s that all about, and why ? Read on !
Tag: FSC
ITIL: What is the CAB ?
ITIL Methodology advises that every RFC (Request For Change) be run through the CAB (Change Advisory Board).
What’s that all about, and why ? Read on !
Tag: ITIL
ITIL: What is the CAB ?
ITIL Methodology advises that every RFC (Request For Change) be run through the CAB (Change Advisory Board).
What’s that all about, and why ? Read on !
Tag: RFC
ITIL: What is the CAB ?
ITIL Methodology advises that every RFC (Request For Change) be run through the CAB (Change Advisory Board).
What’s that all about, and why ? Read on !
Tag: ISO
Linux : Using loop devices (eg : mounting an ISO file)
If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso<br /> spaghetti% sudo mount /dev/loop0 /mnt<br /> spaghetti% ls /mnt<br /> Autorun.inf setup.exe setup.ico<br /> spaghetti%<br /> [...]<br /> spaghetti% sudo umount /mnt<br /> spaghetti% sudo losetup -d /dev/loop0
This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.
Tag: Loop Device
Linux : Using loop devices (eg : mounting an ISO file)
If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso<br /> spaghetti% sudo mount /dev/loop0 /mnt<br /> spaghetti% ls /mnt<br /> Autorun.inf setup.exe setup.ico<br /> spaghetti%<br /> [...]<br /> spaghetti% sudo umount /mnt<br /> spaghetti% sudo losetup -d /dev/loop0
This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.
Tag: Losetup
Linux : Using loop devices (eg : mounting an ISO file)
If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso<br /> spaghetti% sudo mount /dev/loop0 /mnt<br /> spaghetti% ls /mnt<br /> Autorun.inf setup.exe setup.ico<br /> spaghetti%<br /> [...]<br /> spaghetti% sudo umount /mnt<br /> spaghetti% sudo losetup -d /dev/loop0
This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.
Tag: Cell Phone
Perl : A module to play with a GSM mobile
As you might have read in my previous post about accessing your cell phone with the AT-commands under Linux.
If not, you might want to start there for a little context.
I finally wrote and released on CPAN a Perl module which will help to automate cell phone operations such as saving/restoring the phonebook or sending an SMS.
Examples are included in the documentation. I believe I made it easy to use, but let me know if I’m wrong 😀 .
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Gsm
Perl : A module to play with a GSM mobile
As you might have read in my previous post about accessing your cell phone with the AT-commands under Linux.
If not, you might want to start there for a little context.
I finally wrote and released on CPAN a Perl module which will help to automate cell phone operations such as saving/restoring the phonebook or sending an SMS.
Examples are included in the documentation. I believe I made it easy to use, but let me know if I’m wrong 😀 .
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Mobile
Perl : A module to play with a GSM mobile
As you might have read in my previous post about accessing your cell phone with the AT-commands under Linux.
If not, you might want to start there for a little context.
I finally wrote and released on CPAN a Perl module which will help to automate cell phone operations such as saving/restoring the phonebook or sending an SMS.
Examples are included in the documentation. I believe I made it easy to use, but let me know if I’m wrong 😀 .
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Phonebook
Perl : A module to play with a GSM mobile
As you might have read in my previous post about accessing your cell phone with the AT-commands under Linux.
If not, you might want to start there for a little context.
I finally wrote and released on CPAN a Perl module which will help to automate cell phone operations such as saving/restoring the phonebook or sending an SMS.
Examples are included in the documentation. I believe I made it easy to use, but let me know if I’m wrong 😀 .
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Sms
Perl : A module to play with a GSM mobile
As you might have read in my previous post about accessing your cell phone with the AT-commands under Linux.
If not, you might want to start there for a little context.
I finally wrote and released on CPAN a Perl module which will help to automate cell phone operations such as saving/restoring the phonebook or sending an SMS.
Examples are included in the documentation. I believe I made it easy to use, but let me know if I’m wrong 😀 .
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: AT-Commands
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Cu
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Rs232
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Serial Port
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: SIM Card
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Uart
Linux + GSM : How to access your cell phone innards with Linux
This article explores your options to access your GSM cell phone from a linux system, and manipulate SMS and phonebook entries.
Doesn’t provide hints about how to unlock a GSM cell phone though 😉
Tag: Code
Perl : Optimizing pattern searches with Regexp::Assemble
When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.
In order to optimize such a pattern matching, you can use the Regexp::Assemble module.
Tag: Cpan
Perl : Optimizing pattern searches with Regexp::Assemble
When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.
In order to optimize such a pattern matching, you can use the Regexp::Assemble module.
Tag: Dev
Perl : Optimizing pattern searches with Regexp::Assemble
When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.
In order to optimize such a pattern matching, you can use the Regexp::Assemble module.
Tag: Module
Perl : Optimizing pattern searches with Regexp::Assemble
When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.
In order to optimize such a pattern matching, you can use the Regexp::Assemble module.
Tag: Regexp
Perl : Optimizing pattern searches with Regexp::Assemble
When you perform a pattern matching with multiple “or” (|) clauses, such as /pattern1|pattern2|pattern3/, Perl regexp engine will try to match each of them one after the other in sequence, resulting in poor performance if you have a long list of “or” clauses.
In order to optimize such a pattern matching, you can use the Regexp::Assemble module.
Tag: Virtual Terminals
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
Tag: Vt
Linux : Taking control of Virtual Terminals (VT) from command line
When you use Linux in text mode (as opposed to with an X server), you readily have access to multiple Virtual Terminals (aka VT for short) by hitting one of your
This lets you access one of the VTs which are initialized at boot time, but won’t let you create new ones even if your kernel configuration would allow more VTs. Furthermore, what if you want to deal with VTs from a script ?
This post covers the 3 commands which will let you control your VTs from the command line or from a script.
Tag: Script
Unix : the “script” command
The script command is a must for any unix sysadmin.
Once invoked, it will faithfully write anything you typed as well as any output generated in your terminal into a file of your choice (defaults to “typescript”).
This is great when you want to document everything you did on a specific server, for example.
spaghetti:~$ script<br /> Script started, file is typescript<br /> spaghetti:~$<br />
When launched, you don’t see anything, but everything displayed goes to a file as well as the terminal.
Tag: Transcript
Unix : the “script” command
The script command is a must for any unix sysadmin.
Once invoked, it will faithfully write anything you typed as well as any output generated in your terminal into a file of your choice (defaults to “typescript”).
This is great when you want to document everything you did on a specific server, for example.
spaghetti:~$ script<br /> Script started, file is typescript<br /> spaghetti:~$<br />
When launched, you don’t see anything, but everything displayed goes to a file as well as the terminal.
Tag: Cross Site Scripting
Web Security : What are XSS?
XSS (Cross Site Scripting) are a kind of attacks which are fairly popular these days and could target anyone, but are not nearly well known from most people.
In this post, I’ll try to give a short explanation of what they are.
Tag: Internet
Web Security : What are XSS?
XSS (Cross Site Scripting) are a kind of attacks which are fairly popular these days and could target anyone, but are not nearly well known from most people.
In this post, I’ll try to give a short explanation of what they are.
Tag: Web
Web Security : What are XSS?
XSS (Cross Site Scripting) are a kind of attacks which are fairly popular these days and could target anyone, but are not nearly well known from most people.
In this post, I’ll try to give a short explanation of what they are.
Tag: Xss
Web Security : What are XSS?
XSS (Cross Site Scripting) are a kind of attacks which are fairly popular these days and could target anyone, but are not nearly well known from most people.
In this post, I’ll try to give a short explanation of what they are.
Tag: Sed
sed : replacing a text in a file
To replace a text in a file, you can invoke sed as in the following example :
% cat file.txt | sed -e 's/text/replacement/g' > result.txt
This will change all the occurences of “text” to “replacement” in “file.txt” and output the result in “result.txt”
Note : As suggested by Matthias from adminlife in the comments, if you wanted to do “in place” text replacement (that is modify the file without a temporary file in between), you can do the following :
Tag: Ftp
Estimating network throughput / bandwidth / performance with FTP
On a Unix machine, you can use this little ftp trick to have an idea of your throughput :
ftp somehost
ftp> put “| dd if=/dev/zero bs=100000 count=100” /dev/null
200 PORT command successful.
150 ASCII data connection for /dev/null (192.168.0.1,32953).
100+0 records in
100+0 records out
226 Transfer complete.
local: | dd if=/dev/zero bs=100000 count=100 remote: /dev/null
10000000 bytes sent in 2.9 seconds (3388.52 Kbytes/s)
This will generate a stream of bytes from one host to another and give you the data rate at the end
Tag: Network
Estimating network throughput / bandwidth / performance with FTP
On a Unix machine, you can use this little ftp trick to have an idea of your throughput :
ftp somehost
ftp> put “| dd if=/dev/zero bs=100000 count=100” /dev/null
200 PORT command successful.
150 ASCII data connection for /dev/null (192.168.0.1,32953).
100+0 records in
100+0 records out
226 Transfer complete.
local: | dd if=/dev/zero bs=100000 count=100 remote: /dev/null
10000000 bytes sent in 2.9 seconds (3388.52 Kbytes/s)
This will generate a stream of bytes from one host to another and give you the data rate at the end