Monthly Archives: January 2010

Simple string manipulation in C++

The code bellow is a simple example, howto pass string to a function. #include #include using namespace std; void display(string a, string b, string comp){ cout

  • Share/Bookmark

Setting up to compile C++ on Linux

Firts, check if you have g++ instaled. Run this on console: g++ -v If show version, g++ installed. Now, create a simple shell script to compile you cpp file #/bin/bash # gpp compiller g++ -pedantic-errors -ansi -Wall -o $1 $1.cpp Now, to compile the str.cpp use this: gpp str

  • Share/Bookmark

Generate a Certificate Signing Request (CSR) on CentOS

Follow this steps openssl genrsa -des3 -out elmaqu.es.key 1024 Now, you have the RSA PRIVATE, let’s create de CSR… openssl req -new -key elmaqu.es.key -out elmaqu.es.csr Don’t type additional password. Yum must fill all fields correctly. Now, cat elmaqu.es.csr and pest on website

  • Share/Bookmark

Install imagemagick with PHP imagick extension on CentOS

To install imagemagick with imagick extension on centos follow these steps: yum install -y ImageMagick ImageMagick-devel imagick After, include file for imagick.so module and restart apache: echo “extension=imagick.so” > /etc/php.d/imagick.ini /etc/init.d/httpd restart

  • Share/Bookmark

Install GeoIP on CentOS

This is a very simple step-by-step.. 1.Install geoip via yum: yum install geoip geoip-devel 2.You also might want to download database with ip addresses from Maxmind website and place it in /usr/share/GeoIP (which is a default location of geoip upon installation). 3.Install PECL extension: pecl install geoip 4.Add extension=geoip.so to your /etc/php.ini 5.Restart: apachectl restart

  • Share/Bookmark