12 November 2015

screen atas pfsense

get command line

sekali seumur hidup
 - pkg

- pkg install screen

perlu logout dan login sebelum :
 - screen

20 August 2015

gevent not so parallel

2 issue here.

1) gevent.pool is not so perfect. It would not start new thread untill all running thread exit.
Perfect implementation should start a thread immediately when there is a vacant in the pool.

2) the thread seem not execute parallel. In below example, function do_work_function clearly not running in parallel.

Really feel been bluffing all this while..... thanx 0xpcode :)

from gevent.pool import Pool
import time
import logging

rows = range(10)
pool = Pool(CONCURRENCY)

def do_work_function(param1):
print "start" , str(param1 )
    print "--finish" , str(param1 )
for row in rows:
  pool.spawn(do_work_function,row) # blocks here when pool size == CONCURRENCY
  print "spawn thread %s" % str(row)

print "start join"
pool.join(timeout=1) #blocks here until the last 10 are complete
print "end join" 

13 August 2015

python package

install location (ubuntu 14.04)

email test

HELO local.domain.name

MAIL FROM: mail@domain.ext

RCPT TO: mail@otherdomain.ext

Subject:-type subject here-

ref: http://www.yuki-onna.co.uk/email/smtp.html