Posts

Showing posts from November, 2011

A Toy model in Russia Museum, Cool!!!

You guys should take a look at it :) , deep detail on tiny things (thank englishrussia) http://englishrussia.com/2011/11/29/tiny-russia-in-a-st-petersburg-museum/

Remove PYC function in buildbot package

I play with buildbot around 4-5 days. Then I just found '''  buildbot.steps.python_twisted.RemovePYCs '''. There has content in the method is ''' find . -name "*.pyc" | xargs rm ''' which is interesting. :)

Topic: How to detect computer in promiscuous mode

nmap with nmap.org/svn/scripts/sniffer-detect.nse how to use >> nmap --script=sniffer-detect.nse other can find by google with keyword 'detect promiscuous mode computer' thank ref - http://www.markmmanning.com/blog/2009/03/detecting-computers-in-promiscuous-mode.html

Best of VIM tips

ref  http://www.rayninfo.co.uk/vimtips.html  (thank   zzapper) ref  http://www.viemu.com/vi-vim-cheat-sheet.gif  (thank viemu)

Buildbot master.cfg : issue#1

- Don't use WithProperties within SetProperty 

Screen and Byobu , again

When your linux machine have both screen and byobu. you can do below for daemon mode(-d) with name(-S) , sorry don't know about (-m) yet. >> byobu -dmS then >> byobu -r or just byobu (if there is only one session valid, i think) when you wanna go out from screen but want it still deamon >> (in byobu session) byobu -d more tips - f7 for copy mode - ctrl - a ctrl - a for switch tab(window) - f8 for change tab's title - ctrl - a ctrl - c for create new tab(window) - ctrl - a <0-9> for changing windows

Setup python 2.7 for 10.04(natty)

http://askubuntu.com/questions/17841/will-python2-7-be-available-for-10-04-in-the-future

Building python 2.7.1 on lucid

Today, i got a task for build new version of python (2.7.1) on lucid. I googled then found  http://ubuntuforums.org/showthread.php?t=1529315 . tar xzf Python-2.7.tgz cd Python-2.7 ./configure make sudo make altinstall Then create virtualenv -> virtualenv --no-site-packages -p  / usr / bin / pythonx.x.x

Boom De Ya Da

C - Am - F - G thank DisCh

Beer Beer Beer - Rob Manuel

Chord : Beer beer beer F - C  Bb - F - C  thank -> rob manuel and ultimate guitar ( http://tabs.ultimate-guitar.com/m/misc_unsigned_bands/rob_manuel_-_beer_beer_beer_crd.htm )

Setup wget for mac/linux

For mac 1. download wget.xxx.tar.gz from official web. 2. unpack it. 3. run ./configure 4. sudo make install ref to http://www.thelinuxblog.com/linux-man-pages/1/wget

TIP for setup psycopg2 for mac/linux

If something like 'cannot find pg_config' , we should add /path/to/postgres/x.x/bin to PATH environment. That's all for this post.

Revise linux screen (knowledge)

Linux screen is useful! :) Enter to scroll/copy mode. >> Ctrl - a - [  Begin and end copy text >> press space bar to begin copy then space bar to end copy Paste copied text >> Ctrl - a - [ ref : http://www.samsarin.com/blog/2007/03/11/gnu-screen-working-with-the-scrollback-buffer/ (thank to samsarin)

Using python-linkedin

After follow instruction from http://code.google.com/p/python-linkedin/ Then you have use the ACCESS_TOKEN that NOT the REQUEST_TOKEN

Purge queues with amqplib

Use amqplib from amqplib import client_0_8 as amqp # Create connection conn = amqp.Connection(     host="localhost:5672",     userid="xxxxx",     password="xxxxxxxxx"     virtual_host="/",     insist=False ) chan = conn.channel() # Get list of queues (list type) # # ex. list_queues = ['queue-1','queue2',....] # for queue in list_queues:     chan.queue_purge(queue) Preparation Data ( thk juacompe )         sudo rabbitmqctl list_queues name > queues.py    inside vim let's do        $s/^/"/  # for insert " infront of queue name       $s/$/",/ # for insert ", infront of queue name       fill queue=["xxxx for the first line       then you will get something like this       ----------------------------       queues_list = ["xxxxx",       "xxxxx",       ...       "xxxxx"]       ----------------------------    Bring your ipython and env

Prepare for python development on Mac

Here's instruction 1. Get the dmg file of python from www.python.org, then install it. 2. Get the dmg file of setuptool from pypi, then install it. 3. Follow step from http://blog.praveengollakota.com/47430655 (very thank to praveen)