batch scanning
As vezes é necessário copiar uma quantidade bizarra de arquivos, uma maneira simples de colocar em batch esta tarefa.
1 #!/bin/bash
2
3 device=“hpaio:/usb/Photosmart_C3100_series?serial=BR73NGQ13X04KV”;
4
5 while true;
6
7 do if [[ -a stop_file ]];
8 then break ;
9 fi;
10
11 echo “scanning” ;
12 name=`date +%s` ;
13 scanimage -d $device -p >$name.pnm;
14
15 convert $name.pnm $name.jpg;
16 rm $name.pnm;
17
18 echo “sleeping” ;
19 sleep 10s;
20
21 do if [[ -a stop_file ]];
22 then break ;
23 fi;
24
25 done
I’m back, old friend.
March 2, 2008, 4:28 pm
Filed under:
work
Yes, tomorrow I’ll restart working at Brazil Telecom, as , again, security analyst.
But what I really want say is “I HATE HUMAN RESOURCES”, yes, beautiful girls that don’t know nothing trying hire someone for something that they don’t give a shit.
My former boss invited me to work with him, again, at Brazil Telecom’s SOC, and at the interview with the HR (they don’t know nothing about computers & security , but I expected at least that they would read my resume before the interview, I was wrong)
HR: You’ll work at Brt
Me: I already worked at Brt, actuality, I worked at this same position there.
HR: Really?? Did work at Brt???
Me: Yes, look at my resume.
HR: OH, Yes, you worked there. So, What’s your expectations at Brt??
Me: ???? I’ve already worked there, I already know at will find there, I don’t have any new expectations.
gtk and cedilla, a big brazillian problem
One of the mostly annoying thinks about gtk is ‘ç’, especially when you are a Portuguese speaker and use US keyboard + gtk, this is because someone on the past made this choice
at us-intl keyboards, acute+c = ć
I’m not arguing against Polish, Bosnian, Croatian or Serbian, but is a stupid choice when we compare the use of ç in the Latin World (Brazil, France, Spain, Portugal, etc) , even English has some ç.
My way to solve that is simple.
diff gtk.immodules.old /etc/gtk-2.0/gtk.immodules
14c14
< “cedilla” “Cedilla” “gtk+” “/usr/share/locale”
“az:ca:co:fr:gv:oc:pt:sq:tr:wa”
—
> “cedilla” “Cedilla” “gtk+” “/usr/share/locale” “az:ca:co:fr:gv:oc:pt:sq:tr:wa:en”
I hope that, some day, someone will fix that or put at the gtk ebuild a flag like us_latin_cedilla
180 millions of Brazilians will love it.
Gentoo Tools
Gentoo is know as a hard linux distribution, in fact, only the installation is a hard process, everything else is just a piece of cake.
Ok, it’s not easy as ubuntu, but with the right tools, everyone can make magic.
IMHO, no one can have all Gentoo experience without:
- equery (useful when you need information, as USE flags, depends, package contents, etc)
- eix ( excellent search packages program )
- euse (USE flags )
- revdep-rebuild (after an emerge -NDuav world, to fix broken packages)
- module-rebuild rebuild -X ( after an kernel update, rebuild old modules to fit with your new kernel)
Equery, euse and revdep-rebuild are part of gentoolkit ( emerge gentoolkit), eix and module-rebuild have their own package.
And, of course, vim for everything else 
using zenity with emerge
Zenity is a great tool, it creates a gtk dialog box using shell commands.
The following line shows how you can make a emerge without worry waiting for a terminal response.
emerge -NDupv world >/tmp/newpackage && zenity --text-info --filename=/tmp/newpackage && zenity --question --text="emerge?" && emerge -NDuv world
Brasilia
Now I ‘m officially a Candango, someone who left his hometown, his friends, everything behind to start a new life at Brasilia.
Brasilia is strange and pharaonic, every building was created to be unique, especially the government buildings, like the National Congress and the Three Powers Square. Brasilia is breathtaking.
Unfortunately, everything is so far.
Gta, Mario edition
November 22, 2006, 12:41 pm
Filed under:
youtube