But Not Yet

Month

November 2006

14 posts

Dock

Mai mult sau mai putzin evident: daca Dock-ul moare poate fi lansat manual. Se gaseshte in /System/Library/CoreSerices. Un open Dock.app in directorul ala l-a readus la viatza pe-al meu. :-)

Nov 26, 2006
Traffic shaping

Limitarea vitezei unei anumite conexiuni se poate face foarte ushor in MacOS X. Zilele trecuta am avut nevoie de asha ceva pentru ca dadusem un upload mare la flickr care perturba destul de neplacut restul legaturilor.

Primul pas: gasirea IP-ului care trebuie limitat.


alexandra:~ raz$ lsof -i tcp -P -n
COMMAND     PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
...
iPhoto    25979  raz   20u  IPv4 0x03aed7e4      0t0  TCP 192.168.4.11:53133->68.142.214.24:80 (ESTABLISHED)
...
alexandra:~ raz$

Urmatorul pas e inspectatul listei de reguli de filtrare:


alexandra:~ raz$ sudo ipfw -at list
02000  737703   65999581 Sun Nov 26 00:11:57 2006 allow ip from any to any via lo*
02010       0          0                         deny ip from 127.0.0.0/8 to any in
02020       0          0                         deny ip from any to 127.0.0.0/8 in
02030       0          0                         deny ip from 224.0.0.0/3 to any in
02040       0          0                         deny tcp from any to 224.0.0.0/3 in
02050 1611762  571826403 Sun Nov 26 00:11:57 2006 allow tcp from any to any out
02060 4573890 5814225410 Sun Nov 26 00:11:57 2006 allow tcp from any to any established
02070       0          0                         allow tcp from any to any dst-port 3283 in
02080       0          0                         allow tcp from any to any dst-port 5900 in
02090       5        300 Fri Nov 24 18:00:13 2006 allow tcp from any to any dst-port 22 in
02100       0          0                         allow tcp from any to any dst-port 9001 in
02110       2        128 Tue Nov 21 22:43:07 2006 allow tcp from any to any dst-port 548 in
02120       0          0                         allow tcp from any to any dst-port 427 in
02130       0          0                         allow tcp from any to any dst-port 80 in
02140       0          0                         allow tcp from any to any dst-port 427 in
02150       0          0                         allow tcp from any to any dst-port 443 in
12190       6        360 Fri Nov 24 02:40:42 2006 deny tcp from any to any
65535 1613689  168518942 Sun Nov 26 00:11:42 2006 allow ip from any to any
alexandra:~ raz$

Dupa cum se poate ushor vedea regula 02050 da voie tot traficului outbound sa treaca. Pentru a putea face shaping-ul trebuie ca regula noastra sa stea inainte.


alexandra:~ raz$ sudo ipfw add 02041 pipe 1 ip from any to www.flickr.vip.mud.yahoo.com out
02041 pipe 1 ip from any to 68.142.214.24 out
alexandra:~ raz$

Urmeaza apoi configurarea pipe-ului:


alexandra:~ raz$ sudo ipfw pipe 1 config bw 200kbit/s queue 10kbytes
alexandra:~ raz$

In final rezultatul arata cam asha:


alexandra:~ raz$ sudo ipfw -a list
02000  739192   66178995 allow ip from any to any via lo*
02010       0          0 deny ip from 127.0.0.0/8 to any in
02020       0          0 deny ip from any to 127.0.0.0/8 in
02030       0          0 deny ip from 224.0.0.0/3 to any in
02040       0          0 deny tcp from any to 224.0.0.0/3 in
02041     673     995125 pipe 1 ip from any to 68.142.214.24 out
02050 1633799  603670369 allow tcp from any to any out
02060 4585980 5815034499 allow tcp from any to any established
02070       0          0 allow tcp from any to any dst-port 3283 in
02080       0          0 allow tcp from any to any dst-port 5900 in
02090       5        300 allow tcp from any to any dst-port 22 in
02100       0          0 allow tcp from any to any dst-port 9001 in
02110       2        128 allow tcp from any to any dst-port 548 in
02120       0          0 allow tcp from any to any dst-port 427 in
02130       0          0 allow tcp from any to any dst-port 80 in
02140       0          0 allow tcp from any to any dst-port 427 in
02150       0          0 allow tcp from any to any dst-port 443 in
12190       6        360 deny tcp from any to any
65535 1613721  168521663 allow ip from any to any
alexandra:~ raz$

That’s all. :P

Lectura suplimentara: man ipfw.

Nov 26, 2006
mrxvt-0.5.2

mrxvt-0.5.2 are nevoie de un patch ca sa mearga la viteza maxima. Chiar daca pagina de download indice clar lucru asta pana acum nu mi-a sarit in ochi.

Later update: 0.5.2 nu a mers prea bine by default. Ce-am adaugat ca sa fie iar e ok sunt urmatoarele linii in ~/.mrxvtrc:

Mrxvt.foreground:       white
Mrxvt.background:       black

Mrxvt.tabTitle:         Terminal

#Mrxvt.initTermNumber:  10

Mrxvt.macro.Shift+Left:         GotoTab -1
Mrxvt.macro.Shift+Right:        GotoTab +1

Another later update: Un link interesant despre problema cu actualizatul numelui tab-lui. Pana la urma am debifat chestia cu PROMPT_COMMAND din ~/.bashrc.

Nov 20, 2006
And writing...

Yes, that’s another reason for starting this blog. I want to write about simple and silly things, those that are most often get lost in the passing of time. I’ll probably never come back and read them but I still enjoy the idea of having them waiting for me in a safe place. :P

Nov 20, 2006
Funny Flickr

Flickr just posted an announce about a few new services. What is funny is that the links they provide for the first two, Guess Pass and Flickr Mobile, doesn’t work. :P The error says:

Oops! Looks like you followed a bad link.

The good part is the last link they gave, to a blog post, does contain a proper link to the Flickr Mobile (which looks pretty neat :P).

Nov 20, 2006
Broken search

I know, the search is broken. But at least is where I wanted it to be. :P

Nov 19, 2006
lsbom

Ieri am fost harnic shi am pus mana shi am dezinstalat DSS de pe alladin. Din cate shtiu nu exista un uninstaller pt. el, insa MacOS-ul tzine in /Library/Receipts/ o evidentza cu toate instalarile facute pe mashina respectiva. Lucrurile stau relativ clar: fiecare program are un director in care se afla (printre altele) shi un fishier numit Archive.bom. Contzinutul se poate vizualiza cu un program numit (mai mult sau mai putzin evident) lsbom. Pentru fiecare fishier e mentzinut pe langa calea completa shi: drepturile, data ultimei actualizari, dimensiunea shi un checksum.

One more thing: bom chiar vine de la “bill of materials” vine. :P

Nov 19, 2006
Nikolai Nosov - The Adventures of Dunno and his Friends

I don’t know how many people from Western world know about this book. For me, and I would dare to say this is the case also for many Romanian people of my age, it was a wonderful book that made our childhood brighter. :) There are a lot of reasons for this. The story take place in a world populated by tiny small boys and girl called Mites. No one of them was bigger than a pine cone the book tell us. But even they are so small these Mites are capable of amazing things! In this particular book they make a air ballon! :)

Does it sounds amazing? It was. To hear the things that Mites do when you are still a child was a great experience. I gave a nice feeling that it still OK to be a child. And now, when re-read and I look at the pictures from there I still remember a little of how it was then.

Thank you D. for reminding me about this book. :-)

Nov 19, 2006
Pain, pain, super pain

I knew getting the CSS right will be painful but it was even harder than I expected. :| Hopefully, now is (almost) right. :P

Nov 19, 2006
Prolog

More than a year ago, when I bought this domain, I didn’t though it will take so long till I’ll setup a homepage on it. I’m doing it now not because I have more time or because I have more things to say. I’m doing now because later it will be harder and harder to do it.

Nov 18, 2006
rzm_googieSpell

This is a plugin that allows the use of GoogieSpell in Textpattern.

Nov 18, 2006
µtracker

µtracker is a very minimalistic web tracker. What is does is logging in a file as much information as possible about the pages it monitors. The main reason behind writing this program was the incompletness of the of information Google Analytics offers.

The µtracker has only 2 files:

  • utracker.js: this is used to gather some data that is only available using JavaScript (referral, resolution, color depth, flash version, java support)
  • utracker.php: this is used to do the actual logging. In addition the script will also record the remote IP, the remote TCP port and the browser identification data.

To enable the tracking, the following line needs to be included somewhere in the web page:


<script src="utracker.js" type="text/javascript"></script>

A line from the log file looks like this:


ts:Thu, 20 Jul 2006 02:40:11-0400|ip:141.157.62.212|p:50708|
b:Mozilla/5.0 (Macintosh; U; PPC MacOS X; en) AppleWebKit/418.8 (KHTML, like Gecko) Safari/419.3|
m:GET http://razvan.musaloiu.com/software/utracker/utracker.php|
JSINFO|ref:|res:1024x768|colors:32-bit|flash:8.0%20r24|java:1|
href:http://razvan.musaloiu.com/software/utracker/

Legend: ts = timestamp, p = remote port, b = browser, m = method, ref = referral, res = resolution.

Note: the line is contiguos. The linebreaks in the above example are only for display purposes.

Installation instructions:

  • the output file (utracker.log) needs write rights.
  • the utracker_url from utracker.js needs to change to point to the web address of the utracker.php

Note: utracker.php can be also included in php scripts. This will enable a transparent logging even if the client doesn’t use Javascript.

The project’s code is hosted at Google Code.

Nov 18, 2006
The Shoebox

This is the software that powers my photoblog. It’s written in Python and it servers the pictures from Flickr.

Nov 18, 2006
Meebo chat

Nov 18, 2006
Next page →
2010 2011
  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August 1
  • September
  • October
  • November
  • December
2009 2010 2011
  • January 1
  • February 1
  • March
  • April
  • May
  • June
  • July
  • August 1
  • September
  • October
  • November
  • December
2008 2009 2010
  • January 40
  • February 9
  • March 12
  • April 3
  • May 1
  • June 3
  • July 1
  • August 1
  • September 2
  • October 2
  • November
  • December 1
2007 2008 2009
  • January 1
  • February 1
  • March 1
  • April
  • May 4
  • June
  • July
  • August
  • September
  • October
  • November
  • December 3
2006 2007 2008
  • January 23
  • February 17
  • March 19
  • April 15
  • May 18
  • June 15
  • July 15
  • August 12
  • September 9
  • October 4
  • November 8
  • December 3
2005 2006 2007
  • January
  • February
  • March 2
  • April
  • May
  • June
  • July
  • August
  • September
  • October
  • November 14
  • December 43
2005 2006
  • January
  • February
  • March 12
  • April 4
  • May 5
  • June 2
  • July 2
  • August
  • September 2
  • October
  • November 4
  • December