All posts by Emre

ý yerine ı görmek istiyor musunuz?

Türkçe karakterlerin sorunsalı olan ISO-8859-9 formatıyla UTF-8 arasındaki uyuşmazlığı çözen küçük bir python scripti yazdım. Program girdi olarak ISO-8859-9 formatlanmış bir yazı alıyor ve de UTF-8 ile formatlayıp dosyaya yazıyor.

Kullanımı:

python convertToUnicode.py --input /path/to/filename.srt --output /path/to/convertedfilename.srt

ya da

python convertToUnicode.py -i /path/to/filename.srt -o /path/to/convertedfilename.srt

Siz de kullanmak istiyorsanız: https://github.com/emresaglam/convertToUnicode

OpenVPN client test, without a client.

If you need to test the connectivity of your openvpn server from a client’s perspective, you can use this command:

echo -e “\x38\x01\x00\x00\x00\x00\x00\x00\x00” |     timeout 10 nc -u your.openvpnserver.ip port | cat -v

 

This sends TLS negotiation header to the server and expects a reply in 10 seconds. If you get an empty line, things timed out. If you get a reply like the line below, you have connectivity.

@M-QM-^MTM-aM-^U^VM-Q^C^@^@^@^@^@@M-QM-^MTM-aM-^U^VM-Q^C^@^@^@^@^@

My letter to Recaro

91NL3dV8fxL._SL1500_Dear Recaro,

Today we are going to talk about a nasty topic: Puking. When input is not routed correctly, it becomes a nasty, dangerous projectile. And that’s exactly what happened when my almost 2 year old daughter started puking on our brand newish Recaro Performance Sport ChildSeat.

Your product acted like a champ!

Stopped the overflows in many layers, absorbed some of the half chewed blueberry leftovers, deflected some others. The smell and the colors of the grapes, almost fermented by the bodily juices and scorching sun, were very easy to clean since the different layers of fabric and foam were super easy to remove.

The designer team of the harnesses needs a raise or a trip to Hawaii or something like that. Where the harnesses meet the seat was designed so good that all I needed to do is to spray some fabric cleaner and use a toothpick to remove the oozy, jelly grape particles.

Overall, if you test your seats against puking, you already know you are doing a great job. If not, you can sleep very good tonight knowing that your product passed my daughter’s puking and my cleaning test!

Thank you Recaro!

Shake your power and sustainability

My wife showed me this really great project called Shake Your Power. I recommend backing their project up on kickstarter. The project is lead by a great musician called Sudha Kheterpal. It’s a good way of transforming kinetic energy to electricity. I’m not going to go into details on how it’s doing it, because their video is doing a great job.

My question on twitter to them was about the support behind this product (especially dead batteries). And their answer was that they wanted to hear my engineering ideas. Here they are:

First of all this is not an engineering issue (unless you want to solve one of the world’s biggest problems: concentrating energy in a reusable and tiny format). My question was more along the lines: What will these people do when their batteries are end of life? And this actually is a support issue.

You are working on a product that will change people’s life for good. People will depend on this product for their main portable electric source.

I’m assuming that the battery is a LiPo (or Li-ion) type. These type of batteries have a lifespan of 300-500 charges. After that, their output starts to degrade significantly. If we are talking about Africa, another factor will be temperatures over 30º C. High temperatures put even more stress on LiPo batteries.

With everyday charging and using, you will most likely get 1-2 years of life from these batteries. And when these batteries are dead, they will need replacing. And if people cannot find electricity, they probably will not be able to find special LiPo batteries.

My recommendation is simple: Leave the charger unit in the shaker just like the way it is. Replace your batteries with easy to find, rechargeable AA batteries.

Or better, build a support infrastructure behind this project that will find the owner and replace the batteries let’s say every 2 years. It might be a bigger challenge than engineering this product, but your change will be permanent!

I just don’t want this to be yet another western project that reaches out to developing countries and forgets about the people that they touched within a few years.

Image by Shake Your Power. All Rights Reserved.
Image by Shake Your Power. All Rights Reserved.

Balonda Yaşamak

Son zamanlarda bir çok arkadaşım (özellikle de sosyal medya üzerinde) ülkenin halinden nefret ediyor. Türkiye’nin bu kadar rezalet yönetilmesine rağmen neden hala AKP iktidarının %50’ye varan oyla başa tekrardan gelebildiğine şaşırıyor ve kendine ve başkalarına açıklamak için nedenler bulmaya çalışıyor.

İşin ilginci de, bu insanların (ve benim tabii ki) bütün sosyal medya arkadaşları da öyle düşünüyor! Çevresinde AKP yandaşı fikir üreten o kadar az kişi var ki, insanlar haliyle son seçimlerin nasıl böyle sonuçlandığına inanamıyorlar.

İşte bu, herkesin kendi balonunda yaşadığının en önemli göstergesi.

İnsanlar haliyle en rahat olduğu ortamlarda hareket etmeyi tercih ederler. Rahat kavramı birçok nedene bağlı olabilir: Kültürel, dinsel, ailesel, yemeksel, iklimsel, vs… Örneğin kabaca: islam dinine bağlı, sıcak iklimde büyümüş, haftasonlarını aile yemekleri içinde geçiren bir insanın, başka dine bağlı, buz gibi bir ülkede, kendi başına izole yaşaması düşük ihtimalli bir tercihtir.

Tercihlerimiz her zaman bize bağlı olmayabilir ama sosyal medya gibi kendimize kolaylıkla uydurabileceğimiz bir ortamda, bize rahat gelmeyen fikirleri olan insanları silerek, çok kolay bir şekilde sevdiğimiz parametrelere uyan bir ortam yaratabiliriz. Sonuçta birisi her dakika AKP’yi öven bir Facebook post’u yapıyorsa, siz de bundan rahatsız oluyorsanız, bu kişiyi listenizden silersiniz, olur biter.

Ama bunu yaptıktan sonra sonuclarına da katlanmanız, bizbize takıldığınızı unutmamanız gerekiyor. Aynı şey sizin balonunuzun dışında ve kendi balonu içerisinde yaşayan insanlar icin de geçerli. Herkes birbirine aynı seyleri anlatıp duruyor ama kimse balonunun dışını etkileyemiyor.

Demokrasi tamamen rakamlara dayalı olduğu icin balonunuzda istediğiniz kadar davul çalın, diğer balon dinlemiyor. Ya balonunu patlat, ya da olanlara şaşırma. Kalın saglicakla.

(Picture credit: The boy in the bubble)

Raspberry Pi carputer update

The only update of the week is that I tested the composite output in a Toyota Highlander’s entertainment system. It booted fine. The fonts are not as crispy as I wanted, but still readable. I didn’t have a chance to test the XBMC however web browsing was acceptable with an open wifi around the campus. 🙂

I’m also waiting some batteries for my old Voltmeter 🙂 Once it’s working I can start some prototyping.

Hopefully more updates in a week.

20130119-231422.jpg

rarcrack with big files

If you are trying to crack a big rar file with rarcrack (Mine was 2.6G) and you’re receiving this error:

$ ./rarcrack --type rar ./file.rar
 RarCrack! 0.2 by David Zoltan Kedves (kedazo@gmail.com)

 ERROR: The specified file (./file.rar) is not exists or
 you don't have a right permissions!

You need to add these lines below in rarcrack.c and recompile. (Put them before #include rarcrack.h )

#define _FILE_OFFSET_BITS 64
#define __USE_LARGEFILE

While you’re there you can fix the error message’s English 😉 I leave it to you to find it. 😉

Raspberry Pi powered carputer.

I got myself a raspberry pi couple of weeks ago. First I tried to make a HTPC out of it using XBMC but the interface was too slow for my taste. So I decided to build a carputer. 🙂 I have very basic electronic knowledge, so this will be a learning process for me too.

So far what I need is this list below:

  • a car (Check)
  • a 12V to 5V converter: I have cheap lighter to USB adapter. I’ll start with that but I’m thinking about this in the future.
  • a 5V power source activated when the car power is shut: For this one I’m going to start with a circuit I had in hand that I was using to charge my wifey’s phone using a small solar panel. It has a 2000mAh Li-Po battery on it. (That battery is most probably flat. I’ll need a new one)
    I will need this power source for only maybe 1 min. Read next bullet point.
  • a relay circuit that will detect that the car power is shut off and will send a GPIO signal to Rpi to shut itself off. Otherwise there will be corruption at some point of time. 😛 I believe I should write a simple script to shutdown to tie it to that GPIO signal.
  • a 7″ touchscreen screen (possibly with an HDMI input. I have couple of candidates.)
  • a software to play music and video. Biggest candidate so far is XBMC.

Nice to have:These will require a USB hub since I only have 2 USB inputs. (I need to look at the power requirements for the USB hub)

  • a wifi/bluetooth solution for phone interaction.
  • a GPS interface.

More update weekly. (hopefully!)