Wednesday, 11 December 2019

Dealing with PDFs

Image to PDF
- Pdfjam works well.
 pdfjam image.jpg

- Also just printing to pdf from the default printing setup

Crop White Borders of a PDF
PdfCrop is an excellent utility with graphical interface

Mixing PDFs together

Saturday, 21 October 2017

Quick basic guide for compiling in C

* Basic simplest way to compile a c++ file

$ g++  file.cpp
This will generate an executable 'a.out' which we can execute to run the program
$ ./a.out
output of the program here.

* If we desire to have a specific name for the generated file we can do:
$ g++ file.cpp -o specificname.o
$ ./specificname.o

* Make
By running the command make, we can organize the compilation in a single file named Makefile. Makefiles are a simple way to organize code compilation.

Run make in the location where your Makefile is to compile and link everything.
If you want verbose output, you can type VERBOSE=1 make (helpful if something goes wrong).
--> A guide for doing Makefiles:

* CMake
CMake is another way to compile the code specially if you need to link several libraries and the project start getting more complex. You just need to have a CMakeLists.txt file.

First, create a build folder and go inside the folder.
Inside your build directory, point cmake to the directory containing the  CMakeLists.txt file. 
$ cmake ..the .. will point to the parent location where your code is.

If all goes well, cmake will process your CMakeLists.txt files, find the location of all libraries and include paths and spew a bunch of configuration information including a traditional Makefile in your build directory.
From here, you can use the traditional make stated in the previous item.
Run make in your build directory

--> A guide for cmake can be found here:

** ccmake 
ccmake is an interface for cmake. Project configuration can be specified interactively through this GUI.

--> A guide for ccmake

CMakeLists.txt: You can create a file called 'CMakelists.txt'.

Useful resources

Friday, 9 June 2017

Dynamic libraries in Linux

See this nice post and solution to common problems.

Thursday, 20 April 2017

Command output to a file in several ways!

Command output to a file in several ways!

The link bellow contains an excellent table to show all the possibilities to do that:

Friday, 31 March 2017

Saturday, 28 January 2017

Cmake versus Make

Info of your hardware

Gui of your hardware in ubuntu:

Information about your display hardware in command line
sudo lshw -C display
Info of CPU
cat /proc/cpuinfo