This is really something i need to learn, and never forget. But this is kind of stuff, I always forget. So I write it up right now.
ps aux|gawk '$11 == "ssh" {print $2}'
This is really something i need to learn, and never forget. But this is kind of stuff, I always forget. So I write it up right now.
ps aux|gawk '$11 == "ssh" {print $2}'
To use a atheros wireless card and NetBSD, as a wireless AP simply do:
ifconfig ath0 ssid YouSSID mode 11g mediaopt hostap ifconfig ath0 192.168.2.1 #ip of the AP # allow forwarding sysctl -w net.inet.ip.forwarding=1
This is pretty simple no ? In fact, it take me a while to find the mediaopt option.
I’ve been looking for this for a while !! Why this f***ing Python process eat so much memory ? I freed all the objects, and don’t have any circular references ..
Every advanced Python programmer need to read this carefully.
On the other side, i’m looking for a good shared memory module for Py ? Do you have some links for me ?
While looking for a fun way to filter my WIFI traffic, I decided to look at userland firewall API in Python. I found: ipqueue.
I haven’t really wrote a full featured app with it, but here the first things to make it work.
# load the kernel queue module modprobe ip_queue # all outgoing ping will pass throught the queue iptables -A OUTPUT -p icmp -j QUEUE
Now here a little script that act as the queue
import ipqueue q = ipqueue.IPQ(ipqueue.IPQ_COPY_PACKET) while 1: p = q.read() pID = p[ipqueue.PACKET_ID] print pID # accept the packet q.set_verdict(pID,ipqueue.NF_ACCEPT)
Next step, simply run this script with the root privilege, and you will see outgoing ping print on the stdout.
Additionnal note: ipqueue only works on python2.2 right now, I hope Neale will fix that soon. Anyway this is really a nice piece of code thanks guy!
Ok, while looking for the latest Placebo Bonus CD on the net, (I saw it at my local retailler but i just want to buy the Bonus CD, not ‘Best of’ that come w/) I decide to go on http://www.virginmega.fr/. And I get this:
'We only support Windows platform 98/SE and upper ..' (I translated because it display this in french)
So dear hackers, geekies, script kiddies, mac-users, open source newbies, ipod-ers, Clie-users, PlamOS-geekies … please flood with your favorite OS ! For windows-losers please hijack your OS identity.
I just want to see the face of the webmaster, just saying : We have an issue, we support only 70% of the current OS .. I know this will never happen in fact
Music industry are loosers, I hope to see lot of bands distribute their music directly on the net, without this merde !
Is it the time for a python alsa SIG ? Phil seems to think about it, why not. I guess it’s time to read the pyrex howto for me:))
Ok the name, is funny .. But I decided to write a little app to monitor my wifi signal level.

The code is too ugly right now, I need to add noise, signal .. and a better OO API. Anyway, it tooks me 2 hours to write this, and that’s why I like Python.
Update
I spend a little time tonight to clean the code and add this to the SVN. So you can find this program at here
I switched to another card, as I’m usually working w/ a broadcom and ndiswrapper which don’t provide noise, and level information. This graph is done with a NetGear (prism54g based card). I’m still wondering why the noise has a so strange graph ??
I now have a Dell Latitude D400 for 1 month. This little (really small) computer is pretty nice to use, but it right now, it’s really hard to have suspend working on this kind of stuff. The main reason: it only support ACPI (no APM), and ACPI isn’t well supported by the Linux kernel.
I have tested several way to fix this issue. The only that’s working fine right now, is to use swsup. So to make it work:
Now your system is ready. Reboot :) ..To put the the system in standby and dump the current state in the swap: echo 4 > /proc/acpi/sleep.
Next step simply bind the power button on this action. This is done w/ the acpid.
#!/bin/sh # /etc/acpi/powerbtn.sh # put the box in swsup mode echo 4 > /proc/acpi/sleep
Beside the S2/S3 ACPI doesn’t work right now, swsup permit to have suspend to disk without too much trouble.
The fight just began to be serious. I mean everybody, is looking at this with aingst or fear. Ian just post today, that he doesn’t really enjoy Kerry, because it isn’t perfect for the country.
Here, I don’t really understand all stuffs. Every day there is a flash on TV about US, and something is clear. For me right now, US people don’t come from this planet, human ? really ?
I know this will be a big FUD, again .. but let me explain:
First we saw a report about a country where every man need to bring a gun. (I mean, in the law, they write: ‘Men should have a gun’).
Yesterday, the report is about TV ads for election. I saw ads, that’s say Kerry smoke drugs while army .. or others worst. I ‘m wondering where they left their dignity ? This really piss me off, I fully understand why young people don’t vote. This looks like a election at SouthPark’s school, with wrong arguments, with wrong weapons. In France, we don’t have this kind of shit on TV, and that’s fine. TV isn’t politic, I mean, they don’t support one or other candidate. Fox and CBS, please keep OUT!
And today, the current report is: Bush and Religion. And this is the worst.. frigthening … I don’t know how to write this, here: Some people on my TV set (americans) say that the US governement doesn’t try to end the war between Israel and Palestin, because the ‘old testament’ say that God will be back on earth on the Israel country..
So, yes I understand why some people want to vote for Bush, and others for Kerry. But I really think they both loose, I don’t know the words in english but this country looks (i don’t mean is.. just look) like a sick boat (ala française). So vote for the ‘not so worst’ ? Sade news today.
I want to finish this post with a picture of Mickael Moore, because I’m a big fan of this guy. Yes I know, he is an extremist, but I really think this kind of people is usefull for a democratie, because he try too explain politics for a large number of people, and even if his vision isn’t always the truth. 20 years ago, we have a lot of humorist like him in France, but most of them die…

Before you send me some chirugical weapons, please keep in mind, that my vision is false mainly because I live in France. I only see pictures that french TV want me to see. And my english isn’t good enought to fully explain myself.
Update: While reading this again, I really don’t want to offense anybody. This post isn’t about people but more general.