Wednesday, 30 June 2010
Certificate problem trying to access Google Analytics
Unwilling to learn about certificates by myself, I asked Google. And one hour later I found a page with a hint to solve the problem: download this
file (from the same server that issues the certificate) and just accept it.
From that point on, you will be able to navigate your Google Analytics account as usual.
Friday, 18 June 2010
SVG to PS using inkscape
inkscape my_graphic.svg --export-eps=my_graphic.eps --export-text-to-path
Sunday, 30 May 2010
Using git to deploy code to remote server
I am developing a web application locally (at my laptop). I am using git to version my code. Now, I wish to deploy it to my virtual server (obviously, at a remote location).
Suppose I start from scratch. I usually keep my webpage code in /var/www/my_domain and at the same location in my web server.
The first thing I have to do is to create a bare git repo in my remote machine. Usually, in my home directory. I log into your remote machine and do (thanks to Caius) as follows:
mkdir git_my_domaincd git_my_domain
git init --bare
git --bare update-server-info
git config core.worktree /var/www/my_domain
git config core.bare false
git config receive.denycurrentbranch ignore
cat > hooks/post-receive
#!/bin/sh
git checkout -f
^D
chmod +x hooks/post-receive
Then, at my local machine, I go to /var/www/my_domain and create a local git repository and add the remote repository I created before as a remote git repository:
mkdir /var/www/my_domaincd /var/www/my_domain
git init
git remote add vps ssh://username@12.12.12.12[:port]/path/to/git_my_domain
Now I can add files to /var/www/my_domain, commit changes and then deploy automatically typing
git push vps masterTuesday, 25 May 2010
Permalink issue in Wordpress
Wordpress relies on Apache's mod_rewrite module for the URL conversion. As you define your conversion rules, it creates a custom .htaccess file that indicates Apache how to rewrite your URLs.
But there is a directive at the Apache configuration file that prevents Apache from reading your .htaccess file explicitly: AllowOverride.
In particular, within my directory section, I had:
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
Changed it to
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
and rocked!
Saturday, 13 March 2010
Annoying error message from startxfce4
<stdin>:1:3: error: invalid preprocessing directive #ThoseNot critical, it seems, not serious, just annoying. I guessed that xrdb was the culprit and searched for its configuration files:
<stdin>:2:3: error: invalid preprocessing directive #or
<stdin>:3:3: error: invalid preprocessing directive #Xft
<stdin>:4:3: error: invalid preprocessing directive #Xft
xrdb: "Xft.hinting" on line 9 overrides entry on line 6
xrdb: "Xft.hintstyle" on line 11 overrides entry on line 7
carlos@molotov:~$ locate xrdb | egrep etc
/etc/xdg/xfce4/Xft.xrdb
There I had lines starting with "# Those", etc. A look at the man page for xrdb indicated that the Xft.xrdb file is passes through the C preprocessor, (whose directives are preceded by #). It clearly states that comments should be preceded by!rather than #.
So edit the conf file, replace # by!and the annoyance is gone!
Tuesday, 29 December 2009
The best R tricks
This time, the post has been written by others. The community has chosen the best R tricks and made a poll whose results can be browsed at
http://stackoverflow.com/questions/1295955/what-is-the-most-useful-r-trick
Friday, 18 December 2009
Running BOINC on a Centos 5.4 server through command line
I wanted to install BOINC on a Centos 5.4 server with no GUI. I could not find BOINC on any Centos RPM repositories and the newest Linux version did not seem to work.
So I went to the BOINC download page and chose the older 6.6.41 version for x86 Linux with CLI only, and downloaded it with wget to my server.
The downloaded file was a Bash executable script that expanded a whole directory with a number of programs inside, among which, boinc and boinccmd.
To have BOINC running, you need just do
nohup boinc &
However, the process is not attached to any BOINC project. I wanted to attach to Ibercivis, so I used the following command:
boinccmd --project_attach http://registro.ibercivis.es d44xxxxxxxxxxxx7c3
Of course, I have masked my authorization string, d44xxxxxxxxxxxx7c3. I got it from the file account_registro.ibercivis.es.xml in another installation I had on another machine.
In a matter of seconds, the command
boinccmd --get_state
indicated that BOINC was already running on my machine. The boinccmd command also allows you to configure plenty of other parameters, but that is way another topic.