I was always using shell scripts to do mass file renamings. But now there are definitely simplier tools exist. One of them came to my knowledge recently is rename. It is standard tool and does the most simple and common task—replace one substring with another in filenames.
Second useful tool is convmv. It not only allows to convert filenames between different encodings, but also to convert between upper and lower case.
Also mmv deserves mention. It could do replacement basing on pattern.
Tuesday, 10 February 2009
Monday, 9 February 2009
RPM verify and restore capabilities
Good that RPM could verify files (-V option) and restore permissions and owner modes (--setperms and --setugids keys). More here: How to reset the permissions of the installed rpm packages with --setperms option. It allow me to repair part of root filesystem with accidentally changed owner.
Saturday, 7 February 2009
Typographic layout
Finally, typographic layout has been included into xkeyboard-config release 1.5 that is available in rawhide now. It enables access to symbols like «, », ©, ≠, —, … from keyboard which is very convenient for typing web texts.
Unfortunately, something makes it non-working when selecting from gnome keyboard config dialog. So, I had to add typo typo:2 to xkb_symbols from setxkbmap -print output and put call of setxkbmap in autostartup programs. Resulting command line is:
Yay! I have typographic symbols in both English and Russian layouts switched with AltGr.
Unfortunately, something makes it non-working when selecting from gnome keyboard config dialog. So, I had to add typo typo:2 to xkb_symbols from setxkbmap -print output and put call of setxkbmap in autostartup programs. Resulting command line is:
$ setxkbmap -symbols 'pc+us+ru(typewriter):2+inet(evdev)+group(shifts_toggle)+level3(ralt_switch)+typo+typo:2'
Yay! I have typographic symbols in both English and Russian layouts switched with AltGr.
Friday, 6 February 2009
Interpretation of old paintings
Pierre Carrière-Belleuse. La place Pigalle in Paris. 1880.
I’m not frequent visitor of museums, but was recently here in Gallery of Impressionists. And it is interesting how old paintings could be interpreted.
For example, this picture. It clearly looks for me as picture from some pseudo-3D isometric computer game. Really, it has broken perspective close to isometric; it has level of detail—only near people have detail faces; it has sprite-alike layout—carriages and people are moving mainly parallel street edges.
Hmm… my mind is too computer-aligned. Need to go for a walk… :)
Friday, 30 January 2009
Configuring lm_sensors for Asus P5E3 motherboard
Standard configuration of lm_sensors with sensors-detect find right monitoring chip and it was showing all reasonable data except voltage, that was differing by more than 10% of nominal. And it was slightly bothering me.
Finally, after reading lm_sensors Asus article, I was able to craft right voltage sensor formulas for my Asus P5E3 motherboard that give the same values as BIOS.
First, need to decompile description tables (iasl package had to be installed):
Deciphering all ACPI magic that is written to dsdt.dsl is not very easy. I was looking for RVLT function that gives the formula for voltage:
Translating to normal language it does approximately the following:
To find out Local parameters for each sensors, need to look at VPAR definition:
Comparing this to order of data in other places of tables (VCore, +3.3V, +12V, +5V) one can see that right coefficients for +12V is 60/10 and for +5V is 20/10.
Resulting config is here.
Finally, after reading lm_sensors Asus article, I was able to craft right voltage sensor formulas for my Asus P5E3 motherboard that give the same values as BIOS.
First, need to decompile description tables (iasl package had to be installed):
# cat /proc/acpi/dsdt > dsdt.bin # iasl -d dsdt.bin
Deciphering all ACPI magic that is written to dsdt.dsl is not very easy. I was looking for RVLT function that gives the formula for voltage:
Method (RVLT, 1, NotSerialized)
{
And (Arg0, 0xFFFF, Local0)
Store (VGET (Local0), Local1)
Store (DerefOf (Index (DerefOf (Index (VPAR, Local0)), Zero)),
Local2)
Store (DerefOf (Index (DerefOf (Index (VPAR, Local0)), One)),
Local3)
Store (DerefOf (Index (DerefOf (Index (VPAR, Local0)), 0x02)),
Local4)
Multiply (Local1, Add (Local2, Local3), Local5)
Divide (Local5, Local3, , Local5)
Add (Local5, Local4, Local5)
Return (Local5)
} Translating to normal language it does approximately the following:
Local1 = VGET(Local0); Local2 = VPAR[Local0][0]; Local3 = VPAR[Local0][1]; Local4 = VPAR[Local0][2]; return Local1 * (Local2 + Local3) / Local3 + Local4;
To find out Local parameters for each sensors, need to look at VPAR definition:
Name (VPAR, Package (0x04)
{
Package (0x03)
{
Zero,
One,
Zero
},
Package (0x03)
{
0x22,
0x22,
Zero
},
Package (0x03)
{
0x14,
0x0A,
Zero
},
Package (0x03)
{
0x3C,
0x0A,
Zero
}
})
Comparing this to order of data in other places of tables (VCore, +3.3V, +12V, +5V) one can see that right coefficients for +12V is 60/10 and for +5V is 20/10.
Resulting config is here.
Sunday, 11 January 2009
Final GSoC gift
Finally, I’ve received my t-shirt. That was complete surprise for me, as I didn’t get any FedEx tracking number. So, Summer of Code 2008 is officially end for me. 2009 starts! :)
Thursday, 11 September 2008
Ember 0.5.4 packages
I’ve updated ember and ember-media still-waiting-for-review packages to newly released 0.5.4 version. Main change since previous is that all three GSoC projects including mine are merged.
Update: Thanks Spot for reviewing the package! Now it is being build and will be in rawhide soon.
Update: Thanks Spot for reviewing the package! Now it is being build and will be in rawhide soon.
Subscribe to:
Posts (Atom)