Archives:
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
Meta:
Categories:
- blunt-hate
- comp
- debian
- django
- dogbert
- dovhcajt
- faks
- kiberpipa
- kitchen sink
- linux
- pootle
- python
- slovenija
- zanimivosti
Recent Posts:
- Sync your iPhone calendar with Google Calendar directly
- Enable native command queueing on your MacBook for Linux/Windows
- Disable autocorrect on iPhone
- Islamska skupnost v Mestnem muzeju Ljubljana
- Fixing MySQL encoding problems
- Ne pozabit izklopit bojlerja.
- Programiranje po specifikacijah
- Išče se: internet
- Žurnal, žurnal …
- Slovenske galerije in tehnika…
Blogroll:
Sync your iPhone calendar with Google Calendar directly
Posted on November 18th, 2008 in dovhcajt |
Image by bluelectric via FlickriPhone’s iCal is one of the strong points of the product as far as I’m considered. However — why does there allways need to be a ‘however’ included? — the iCal does not support synchronizing with other than iCal on OS X, and if you’re using Linux, you’re more or less toasted.
Luckily, there does exist an app named NemusSync, that allows you to sync your iPhone’s iCal with Google Calendar directly, over the air, using Google’s GData API. The app requires you to jailbreak your iPhone and is available via Cydia.
For what I’ve used it, it worked perfectly. I haven’t really tested it much yet, but I think it’s going to become an important tool in my pocket.
Enable native command queueing on your MacBook for Linux/Windows
Posted on November 16th, 2008 in dovhcajt |
Image via WikipediaImage by keepthebyte via FlickrI’ve got a mid 2007 MacBook and I’m quite happy with it. I’m running Debian on it and has served me quite well for some time. However, using Linux, there are always quirks.
One of them is also native command queueing, which MacBook’s hardware (ICH7) supports, but is not enabled. By booting other operating system than OS X, Apple chose to use compatibility so the SATA controller is reprogrammed to emulate IDE.
The instructions are a bit biased for Debian users, but I think you’ll manage. The idea is to recompile GRUB with a little bit of code that reenables AHCI mode. Here’s how you get AHCI mode back (and the NCQ).
First, go to http://boeglin.org/blog/index.php?entry=entry071218-212838 and download the patch there.
Install required packages to build customized grub package:
apt-get build-dep grub apt-get install fakeroot build-essential devscripts
Fetch the GRUB source:
apt-get source grub
Put the patch you downloaded earlier in grub-0.97/debian/patch/.
Edit grub-0.97/debian/patch/00list and put a new line at the end, with “grub-0.97_macpro_esb2_ahci_stage1.patch” in it.
Now change dir to grub-0.97 and execute dpkg-buildpackage -us -uc -rfakeroot. This will build a new, customized grub package. Next step, obviously, is to install it.
With the package installed, all you need to do is copy new stage files over to boot directory and reinstall grub on boot sector:
cp /usr/lib/grub/i386-pc/* /boot/grub/. grub-install /dev/sda
Now you’re supposed to reboot and see your NCQ enabled. To check, you can use:
dmesg | grep -i ncq
The (successful) result would look like this:
ahci 0000:00:1f.2: flags: 64bit ncq ilck pm led clo pio slum part ata3.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 31/32)
Now, if you want grub not go get upgraded, you can block it’s upgrade with dpkg like so:
echo grub hold | dpkg --set-selections
Disable autocorrect on iPhone
Posted on October 19th, 2008 in dovhcajt |
Image by el frijole via FlickrI recently upgraded my iPhone to firmware 2.1 and was a bit disappointed because there’s no iSolitaire to kill my time with it. As a good consequence, my battery lasts longer.
However, I was annoyed by the fact, that Apple incorporated a spellcheck into the fields, that supposedly works flawlessly… if you write in english. If you don’t, however, you need to tap on every word you write in order for autocorrect not to “correct” it. Quite annoying, yes. There are a bunch of solutions flowing around the net, but I only tested it with iPhoneOS 2.1, so this is what works:
- you need to have a jailbroken iPhone
- you need to have Cydia installer
- install BossPrefs
- install CToggle BossPrefs Addon
- set your Keyboard to English
- set Auto Correct to Off in your BossPrefs
That worked for me, however I don’t know if it will work for any other version. If you don’t want/can’t jailbreak your iPhone, Apple is supposed to add the switch in iPhoneOS 2.2.
Islamska skupnost v Mestnem muzeju Ljubljana
Posted on October 14th, 2008 in dovhcajt |
Image via WikipediaVčeraj sem bil na odprtju razstave v Mestnem muzeju. Po krajši uvodni prireditvi je sledil ogled predstave in preizkus njihovih doma narejenih slaščic. No, sam sem vrstni red obrnil, tako da sem najprej preveril slaščice, ki so bile za moj okus razmeroma mastne in nasitne.
Glede same razstave pa me je presenetila velikost razstave, ki se žal nahaja samo v eni mali sobici, temu primerna pa je potem tudi obširnost. Škoda, da se razstava ne spusti globlje v detajle, potem bi morda tudi uspeli razbit tudi kak tabu, tako pa je samo predstavitev Islamske verske skupnosti. Iz tira me je vrgla vitrina z železnim pegleznom in lončenimi posodami, sploh ker nisem zraven našel nobenega besedila, s katerim bi si pojasnil oz. upravičil obstoj tiste vitrine. Valjda ne uporabljajo več likalnikov na žerjavico?
No, četudi je razstava razmeroma skromna - pokazali bi namreč lahko veliko več - so morda spremljevalni dogodki bolj zanimivi. V soboto, 25.10., ob 16h bo namreč kuharska delavnica, burek na 5 načinov, v nedeljo, 26. 10., enako ob 16h pa delavnica za otroke na temo kaligrafija. Izpostavil sem sicer samo dva, meni najbolj zanimiva dogodka.
Aja, pa vseskozi sem se muzal ob vestni uporabi besedne zveze odprtje razstave. Sam sem bolj navajen na otvoritev razstave, pa se mi je to slišalo bolj kot kako prebavno olajšanje.
Fixing MySQL encoding problems
Posted on October 13th, 2008 in dovhcajt |
Image via WikipediaKiberpipa’s web page runs on MySQL, that famous and far too popular open source database, that forces developers to encounter all kinds of funny errors. Well, encoding problems are one of them.
Slovenian language works okay with character set latin2, but MySQL doesn’t really check what encoding is database using, so the database is stored in latin1, and application works using latin2. What MySQL does here, is store the data it gets using latin1 encoding, not knowing the data is already encoded using latin2. Fun.
So, moving to UTF-8 should solve this problems, but unfortunately you can’t just do a dump using UTF-8 encoding, because MySQL breaks your data. You need to dump using the encoding you have the database stored in, then convert using iconv to get an UTF-8 encoded dump. As a last step, you need to change table encodings accordingly.
Ok, enough talk. All the above translates to:
mysqldump --opt --default-character-set=latin1 -u root -p database_name | iconv -f latin2 -t utf-8 | sed -e 's/CHARSET=latin1/CHARSET=utf-8/g' > database_dump.sql



![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=7add92c9-581d-4e15-810e-c865087ade7c)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=7dbd227e-0392-4ba0-8bfb-e31da6aeb062)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=b28db2ec-0a3e-44dc-aaaa-fd430342b2b5)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=2f2dd06c-eb31-4a0b-b3a3-cb1197330d76)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=1cd94cdd-3ea1-4d48-b4c8-031b9fd7e601)