quarta-feira, dezembro 01, 2021

How to simulate paper texture in GIMP

 Step 1: Launch GIMP, and select File-menu > New. Choose the height and width of your paper in pixels, and press ‘OK’. For A4 paper, the size should be 3508 x 2480 pixels.

Step 2: Select Filters-menu > Noise… and choose ‘RGB Noise’. Apart from ‘Preview’ make sure all other check-boxes are unchecked.

Step 3: Do you want your paper to be smooth, or would you like to have a texture that’s tad stronger? Take your pick as you slide the tab on ‘Red’ ‘Green’ or ‘Blue’ between 0.20 to 0.69. Do notice how all three values move in tandem. Check out the preview which may show granular dots increase or decrease in density. I prefer values between 0.20 to 0.32. Once you find a pattern to your taste, click ‘OK’.

Step 4: Go to Image-menu > Mode > Grayscale. This one step will make the dots appear more textured, and shrink your file to one-third its size in kilobytes or megabytes, which is a good thing.

Step 5: Go to Filters-menu > Blur > Gaussian Blur. Choose a value between 3 and 9 on the slider below. Check out the ‘Preview’ to see what suits your taste, and click ‘OK. You’re done. If required, you may re-apply Gaussian Blur with a different value, for an even smoother finish.

Save your file in the format of your choice, and you’re done.


Further tips:

Use the Color-menu > Brightness-Contrast slider to set the tonality of your paper.

quarta-feira, fevereiro 06, 2013

How to disable Overlay Scrollbars in Ubuntu 12.04

There is a simple way to disable the annoying overlay scrollbars in Ubuntu 12.04. Just run the command bellow in the Linux console:


gsettings set org.gnome.desktop.interface ubuntu-overlay-scrollbars false


You don't need to reboot. Just close the applications and open them again, so the old style bars (which are much better) will become visible!

domingo, dezembro 09, 2012

How to install Xfce in Ubuntu 12.04

If you want to use less machine resources on Ubuntu 12.04, or if you simply didn't like Gnome 3 layout and usability, here goes a nice tip to you: use the Xfce desktop enviroment. It's lightweight and makes me remember the good old times from Gnome 2 also (this is just a personal opinion).

To install it on Ubuntu 12.04, use the  following command:

sudo apt-get install xfce4

After installation, you are going to be able to choose your desktop enviroment the next time you try to log in.


Another option is to download and install Xubuntu, a Linux operating system based on Ubuntu that comes with Xfce by default.

Xubuntu 12.04 with Xfce 4.10

sexta-feira, outubro 19, 2012

Original GameMenu.res file for Counter-Strike 1.6

For CS 1.6 players sometimes it is necessary to restore the GameMenu.res file. In most cases, it is placed at "C:\Program Files\Valve\cstrike\resource". You can open it using the Notepad.

Bellow is the code of the original file:


"GameMenu"
{
"1"
{
"label" "#GameUI_GameMenu_ResumeGame"
"command" "ResumeGame"
"OnlyInGame" "1"
}
"2"
{
"label" "#GameUI_GameMenu_Disconnect"
"command" "Disconnect"
"OnlyInGame" "1"
"notsingle" "1"
}
"4"
{
"label" "#GameUI_GameMenu_PlayerList"
"command" "OpenPlayerListDialog"
"OnlyInGame" "1"
"notsingle" "1"
}
"8"
{
"label" ""
"command" ""
"OnlyInGame" "1"
}
"9"
{
"label" "#GameUI_GameMenu_NewGame"
"command" "OpenCreateMultiplayerGameDialog"
}
"10"
{
"label" "#GameUI_GameMenu_FindServers"
"command" "OpenServerBrowser"
}

"11"
{
"label" ""
"command" ""
}
"12"
{
"label" "#GameUI_GameMenu_ChangeGame"
"command" "OpenChangeGameDialog"
"notsteam" "1"
"notsingle" "1"
"notmulti" "1"
}
"13"
{
"label" "#GameUI_GameMenu_Options"
"command" "OpenOptionsDialog"
}
"14"
{
"label" "#GameUI_GameMenu_Quit"
"command" "Quit"
}
}

terça-feira, maio 08, 2012

Linux "nice" command: running a program with modified scheduling priority

There is a very useful program for Linux for setting different priorities to a program: the nice command.
Priority ranges in Linux varies from -20 (greater priority) to 19 (lesser priority). So, the lesser the value, the greater is the scheduling priority.
Use nice is simple. In the example shown bellow, we want to run the program "your_program_name" using priority value 10:

nice -n 10 your_program_name

The default priority value is 0. If you want to set a priority less than 0 (greater priority than the default), you should run it as system root.

quinta-feira, abril 12, 2012

How to set line spacing in LaTeX

Some simple (but very important) commands you should know about line spacing in LaTeX:

\singlespacing - sets the text to single line spacing
\onehalfspacing - sets the text to one half spacing
\doublespacing - sets the text to double spacing

To use such commands, you should use the following package: \usepackage{setspace}


Bellow, there's a simple example about how to use these commands:


\begin{document}
\onehalfspacing
First part of the text (using one half spacing)
\doublespacing
Second part of the text (using double spacing)
\end{document}

quinta-feira, dezembro 29, 2011

Raspberry Pi, the tiny and powerful US$25 computer

Here I'll be posting some videos about the Raspberry Pi, when they become avaliable.


Presentation of one of the first final boards:




First video of the Gertboard connected to the Raspberry Pi's GPIO: