Friday, November 5, 2010

Protest in Polish Parliament Against Senior Chinese Official Accused of Genocide

A screen shot from Polish TVP24 of the two protestors being escorted by a parliamentary security guard. (Screenshot of TVP24)
WARSAW, Poland—A senior Chinese government official accused in Spain of genocide and torture against Falun Gong practitioners in China, was confronted by human rights protesters in the halls of the Polish Parliament in Warsaw Thursday morning.

"We wanted to meet the delegation face-to-face and get a message out to Mr. Jia Qingling: that the persecution of Falun Gong in China that he is co-responsible for is wrong and must be stopped", said Tomasz Kowalski, president of the Polish Falun Dafa Association and one of the protesters.

See Epochtimes details http://www.theepochtimes.com/n2/content/view/45448/

Tuesday, November 2, 2010

Kate Middleton's parents spend weekend at Queen's estate

Amid rumors that a royal engagement is imminent, Kate Middleton's parents were spotted weekending at Queen Elizabeth's Balmoral estate in Scotland.
Michael and Carole Middleton spent the weekend with their daughter and Prince William at Birkhall, Prince Charles’s private residence on the Balmoral estate.

The move is seen as highly symbolic; former aides suggested that the middle-class Middleton family were now firmly welcomed into the royal fold, reports the Daily Mail. "It’s just a matter of time," one aid told the paper.
Kate’s parents were photographed receiving instructions in shooting. "This is the Middletons being taught to be able to join the royals at play," according to the Daily Mail's source.

Brazil's First Woman President Sets Her Agenda

RIO DE JANEIRO, Brazil—In her first televised speech since wining the presidential election, Dilma Rousseff, the next head of state of Brazil, praised current President Luiz Inácio Lula da Silva and emphasized women's rights. She also promised to respect freedom of religion, freedom of the press, and human rights, but above all, she will work to eradicate poverty, reported O Globo.

“We cannot rest while there are hungry Brazilians and while poor children are abandoned to their own luck,” said Rousseff. “It is about an abyss in a developing Brazil.”

More details

The Marketing Corner: Black Friday Countdown

Procrastination can sometimes work in your favor—that is, if you are a consumer.

As a small business owner, procrastination is not your friend. If you sat around and felt you had all the time to put your plan together for Black Friday, like sand in an hour glass, your time is just about come and gone.

More details

Monday, November 1, 2010

Indonesia’s Mount Merapi Erupts Again

Indonesia’s Mount Merapi erupted again Monday, spitting smoke, ash and hot gasses, AP reported. So far no injuries have been reported.

Merapi, the most active of Indonesia’s volcanoes, has erupted several times since Tuesday Oct. 26, killing 38 and forcing the evacuation of 40,000 residents to temporary shelters.

“There are more and more refugees coming down the mountain,” Rukman, the head of disaster response for the Indonesian Red Cross (PMI), told the Christian Science Monitor. “We need water and better sanitation; that is the big problem.”

See detail

Sunday, October 31, 2010

Indonesia Tsunami Death Toll Rises to over 400

The tsunami which swept across Indonesia’s northern Mentawai Islands has now claimed at least 413 lives, reports the Jakarta Post, with 298 still missing.

The tsunami, triggered by a 7.7-magnitude undersea earthquake on Oct. 25, destroyed six of 27 villages on islands and displaced 4000 people.

See Details

Chinese Public Warned to Expect Further Inflation

T
hough inflation exists in China, rarely will an official warn the public to expect it to continue.

A member of the Chinese National Development and Reform Commission recently spoke anonymously to domestic media, saying that further interest rate increases will not control inflation so the public must simply be resigned to it, according to Deutsche Welle.

Subsequently, many media outlets, including China's state-run Xinhua News Agency, reported numerous responses from Internet users. The public decried the NDRC’s warning as illogical.
See more details

US Govt. Investigating China Trade

WASHINGTON—The United Steelworkers union (USW) opposed China’s entrance into the WTO ten years ago, fearing the loss of American manufacturing jobs. Today, the steelworkers are still fighting, saying that by not adhering to WTO rules, China gets an unfair advantage over the United States.

“We fought China’s accession to the WTO because we know that they cheat and they lie and they say we want to be players and play by the rules, and they don’t,” says Gary Hubbard, a spokesperson for United Steelworkers.

In September the U.S. Trade Representative accepted a 5,800-page petition from the USW accusing China's clean energy sector of wide-spread violations of WTO rules.
See more detail

Friday, October 29, 2010

New York Real Estate Expo Set to Inspire Industry

NEW YORK—Distress, lending, wealth, green building, new rules… the list of topics covered at the upcoming NYC Network Real Estate Expo reads as an “all you need to know about real estate in New York.”

From Robert Knakal’s talk on the midterm elections and “How They May Impact Commercial Real Estate Values,” to William Procida’s distressed property seminar, the Mariott Marquis in Times Square will be buzzing on Nov. 5.

Many real estate professionals are gearing up for the event, with organizers anticipating up to 4,000 attendees, double the figure from last year.

See more

China’s ‘Map World’ Without Google

hina’s State Bureau of Surveying and Mapping (SBSM) announced that it will redistribute the market of Internet maps at the end of this year or early next year. Noticeably, Google Maps is not included.

On Oct. 21, China’s Map World, a national, public Internet service of geographic information, was officially up and running. The new Map World has almost the same functions as Google Maps. Information includes roads, water systems, administrative districts, residential areas, and geographic names. It has real-image mode and three-dimensional mode. It also provides information on business locations, such as shops and restaurants. According to the SBSM, Map World will be updated every six months. So far, this website cannot provide high-resolution images of areas outside China.

In March, Google withdrew its Internet search service from China and moved its servers to Hong Kong to avoid Chinese regime censorship. Since then Google’s Internet service market share has been dropping in China. However, mainland Internet users can still access Google, including its map service, through the Hong Kong server.
Chinese Business License

In the past, map information in China has been classified as military secret. And survey and mapping services are still restricted in China. A company must obtain a license before it can provide these services. To apply for the license, the company server that keeps the mapping information must be located inside China, and the company must provide the server’s public IP.

In May, China issued a new regulation called and said all companies who provide Internet geographic information must apply for business permits.

The that were announced in 2007, stipulate that foreign businesses involved in mapping in China, must have joint venture and cooperation with a Chinese business. Also, the Chinese company must be the holding company.

As of the end of September, authorities have issued business permits to 31 companies, including Tencent, Baidu, Sina, and Nokia. Google is not among them.

Since Google Maps did not get a license to operate in China, it has no chance of entering the map service market in China, unless Google moves its servers back to China and agrees to let a Chinese company hold the majority of its stock.
Related Articles

* The Seduction of China’s Red Carpet
* China’s Censorship Shakes the Foundation of Google’s Search

Same Satellite Images

After China set up Map World, Chinese media said that the software is the intellectual property of the Chinese government. However, a Chinese Internet user found out that the satellite images on Map World and Google Maps are exactly the same in many instances, including the number of cars on highways, the cars’ shapes, positions, and colors. The Internet user surmised that the two satellite maps have to come from the same source.

Jiang Jie, Chief of the Bureau’s Center of National Basic Geological Information, admitted, “the satellite images are purchased from overseas.”

So far Google has not commented.

Tuesday, March 23, 2010

Resolve around File Descriptor limited on Reactor Select (selector)

I've been running into problem file descriptor run out using the default reactor. By default, twisted got hardcode the file descriptor to be 1024 (MAX). If you want to change the default MAX need to modify code and recompile. Or we can use the pollreactor to increase several thousand more.
>>
from twisted.internet import pollreactor
pollreactor.install()
<<
usage as normal:
from twisted.internet import reactor

Even if you change the ulimit on filesystem, it doesn't change with the library. This is something hardcode inside twisted lib.

Creating a self-signed cert with one command

Creating a self-signed cert with one command

The following command will generate a new key and create a certificate all in one line suitable for use by Apache or any other SSL tool.

openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout www.example.com.pem -out www.example.com.pem

You can then use the file above in apache with the following two lines

SSLEngine On
SSLCertificateFile www.example.com.pem

Monday, March 22, 2010

python twisted interrupt signal handler


from twisted.internet import reactor
import signal
def shutdown(*f):
sig, ob = f
if sig == signal.SIGINT: reactor.stop() #shutdown the reactor if Ctrl-C enter.

signal.signal(signal.SIGINT, shutdown)
reator.run(installSignalHandlers=0)

twisted.web2 auto reconnecting browser

Making use web2 Broker Class from http://code.google.com/p/twisted-web2-client

class Browser:
#Init Channel
#Authenticate Channel
#Send Channel
#Recieve Channel
def __init__(self, timeout=180 ):
self.timeout = timeout
self.conn = Broker()
self.headers = {}
self.response_headers = None

def parse_response_headers(self, headers):
self.response_headers = headers
self.raw_headers = headers._raw_headers
if headers.hasHeader('set-cookie'):
parseSetCookies = http_headers.parseSetCookie(headers.getRawHeaders('set-cookie'))
self.headers['Cookie']= parseSetCookies

def getResponseBody(self, resp):
d = defer.Deferred()
self.parse_response_headers(resp.headers)
stack = []
stream_mod.readStream(resp.stream, stack.append).addCallback(lambda x: ''.join(stack)).addCallbacks(d.callback, d.errback)
return d

def connect(self, uri, postdata=None, method='GET', *args, **kwargs):
d = self.conn.ask(uri, method, self.headers, postdata,timeout=self.timeout, *args, **kwargs).addCallback(self.getResponseBody)
return d

Monday, March 8, 2010

httpclient for twisted web2

Here is excellent tutorial for twisted web2 client.
http://code.google.com/p/twisted-web2-client/

Thanks to the author, I've spend quite sometime to google, but no luck!

Friday, March 5, 2010

install and config weblizer on ubuntu

http://fontignie.blogspot.com/2006/04/install-and-configure-webalizer-on.html

Install and configure webalizer on Ubuntu

  1. install webalizer
    sudo apt-get install webalizer
    If webalizer is not found, you have to add sources in /etc/apt/sources.list: can comment the universe sources.

  2. Enable the apache2 hostname resolution: go into /etc/apache2/apache2.conf: Change
    HostnameLookups Off
    into
    HostnameLookups On

  3. By default webalizer is not well configured: it does not check in the good log. In /etc/webalizer.conf: Change

    LogFile /var/log/apache2/access.log.1
    to
    LogFile         /var/log/apache2/access.log

  4. Test webalizer:

    sudo webalizer

    If you get a warning like warning: Truncating ...
    It is because you did not put the hostnameLookup. If afterward, you get this message, it can be because you are attacked by a virus...

  5. Run webalizer as a cronjob. This has to be run as root: Edit the root cronjobs by running the command:
    sudo crontab -e
    and add the line:
    0 * * * * webalizer
    With that line, every hour webalizer is run

install and config weblizer on ubuntu

http://fontignie.blogspot.com/2006/04/install-and-configure-webalizer-on.html

Install and configure webalizer on Ubuntu

  1. install webalizer
    sudo apt-get install webalizer
    If webalizer is not found, you have to add sources in /etc/apt/sources.list: can comment the universe sources.

  2. Enable the apache2 hostname resolution: go into /etc/apache2/apache2.conf: Change
    HostnameLookups Off
    into
    HostnameLookups On

  3. By default webalizer is not well configured: it does not check in the good log. In /etc/webalizer.conf: Change

    LogFile /var/log/apache2/access.log.1
    to
    LogFile         /var/log/apache2/access.log

  4. Test webalizer:

    sudo webalizer

    If you get a warning like warning: Truncating ...
    It is because you did not put the hostnameLookup. If afterward, you get this message, it can be because you are attacked by a virus...

  5. Run webalizer as a cronjob. This has to be run as root: Edit the root cronjobs by running the command:
    sudo crontab -e
    and add the line:
    0 * * * * webalizer
    With that line, every hour webalizer is run

squid log analysis

http://www.safesquid.com/html/viewtopic.php?t=2395
http://cord.de/tools/squid/calamaris/
http://www.squid-cache.org/Scripts/