Wikileaks released secret US embassy cables

Wikileaks has struck again, this time releasing information of embassy cables. They include reports of some Arab leaders – including Saudi Arabia’s King Abdullah – urging the US to attack Iran and end its nuclear weapons programme. Other leaked information include:

Wikileaks release of embassy cables reveals US concerns

  • Iran attempting to adapt North Korean rockets for use as long-range missiles
  • Corruption within the Afghan government, with concerns heightened when a senior official was found to be carrying more than $50m in cash on a foreign trip
  • Bargaining to empty the Guantanamo Bay prison camp – including Slovenian diplomats being told to take in a freed prisoner if they wanted to secure a meeting with President Barack Obama
  • Germany being warned in 2007 not to enforce arrest warrants for US Central Intelligence Agency officers involved in an operation in which an innocent German citizen with the same name as a suspected militant was abducted and held in Afghanistan
  • US officials being instructed to spy on the UN’s leadership by Secretary of State Hillary Clinton
  • The very close relationship between Russian PM Vladimir Putin and his Italian counterpart Silvio Berlusconi
  • Alleged links between the Russian government and organised crime
  • Yemen’s president talking to then US Mid-East commander General David Petraeus about attacks on Yemeni al-Qaeda bases and saying: “We’ll continue saying the bombs are ours, not yours”
  • Faltering US attempts to prevent Syria from supplying arms to Hezbollah in Lebanon

[More in BBC]

I’m sure these are information are going to be quite controversial. Is this one of the cases where not knowing is better than knowing? Imagine the increased level of animosity towards Saudi Arabia in the coming days. Would this cause more conflict? Lives of diplomats might be threatened due to this to.

On other note, Australia has condemned Wikileaks and has blocked access and will fine people $11k/day linking to it.

South Korea possibly attacked again as islanders evacuate

Just a few hours ago, explosions were heard at Yeonpyeong Island, journalist were ordered away. Is this a second wave of artillery?

Meanwhile North Korea calls for state of ultra-emergency:

North says Korean Peninsula in state of ‘ultra-emergency’

SEOUL, Nov. 28 (Yonhap) — North Korea said Sunday that the Korean Peninsula is now in a state of “ultra-emergency,” as South Korea and the United States began massive naval drills south of the Yellow Sea border in a show of force against the North.

In a statement carried by the official Korean Central News Agency, the National Peace Committee of Korea, a propaganda organ of the North, denounced the joint exercise as an attempt to trigger a war against the communist nation. (Source: Yonhap)

It appears today South Korea might be under attack again:

(LEAD) S. Korea evacuates islanders on signs of N. Korean shelling

SEOUL, Nov. 28 (Yonhap) — South Korea’s military ordered civilians on Yeonpyeong Island to evacuate to shelters, military officials here said Sunday, as signs of North Korea’s artillery firing were spotted.

“The emergency evacuation order was issued as of 11:18 a.m.,” a military official at the South’s Joint Chiefs of Staff said. “The military was also put on high alert.”

Signs of North Korean provocations were spotted as sounds of artillery fire were heard, the official said.

The South Korean island was shelled by North Korea on Tuesday. Two marines and two civilians were killed in the North’s artillery attack. Most of some 1,700 civilian residents on the island have already left the island, but some 20 residents are still there.

The emergency evacuation order came as Seoul and Washington started large-scale naval drills in a show of force against North Korean aggression. (Source: Yonhap)

South Korea and USA recently began war exercises at the Yellow Sea border. It has been speculated that this may provoke further action from North Korea which China warned against.

How to install mysql2 gem in Ubuntu

Got an error message when you install the mysql2 gem in Ubuntu? Before you install mysql2, make sure you have libmysqlclient-dev installed or you’ll get the following:

[code lang=”bash”]kahwee@kahwee-desktop:/$ gem install mysql2
Building native extensions. This could take a while…
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.

/home/kahwee/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for rb_thread_blocking_region()… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lm… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lz… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lsocket… no
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lnsl… yes
checking for mysql_query() in -lmysqlclient… no
checking for main() in -lmygcc… no
checking for mysql_query() in -lmysqlclient… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/home/kahwee/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
–with-mysql-config
–without-mysql-config
–with-mysql-dir
–without-mysql-dir
–with-mysql-include
–without-mysql-include=${mysql-dir}/include
–with-mysql-lib
–without-mysql-lib=${mysql-dir}/lib
–with-mysqlclientlib
–without-mysqlclientlib
–with-mlib
–without-mlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-zlib
–without-zlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-socketlib
–without-socketlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-nsllib
–without-nsllib
–with-mysqlclientlib
–without-mysqlclientlib
–with-mygcclib
–without-mygcclib
–with-mysqlclientlib
–without-mysqlclientlib

Gem files will remain installed in /home/kahwee/.rvm/gems/ruby-1.9.2-p0/gems/mysql2-0.2.6 for inspection.
Results logged to /home/kahwee/.rvm/gems/ruby-1.9.2-p0/gems/mysql2-0.2.6/ext/mysql2/gem_make.out[/code]

To resolve it, install libmysqlclient-dev:

[code lang=”bash”]sudo apt-get install libmysqlclient-dev[/code]

And now you can install mysql2 successful:

[code lang=”bash”]kahwee@kahwee-desktop:/$ gem install mysql2
Building native extensions. This could take a while…
Successfully installed mysql2-0.2.6
1 gem installed
Installing ri documentation for mysql2-0.2.6…
Installing RDoc documentation for mysql2-0.2.6…[/code]

Great!

[I tried this on Ubuntu 10.10.]

How to install PHP APC through PEAR

If you try to install PHP APC 3.1.5 through PHP PEAR and encounter errors regarding phpize or the following:

[code lang=”bash”]/usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory[/code]

…well don’t worry. You’re missing a few components. For phpize, you’ll need the php5-dev that you can fetch from Ubuntu. For the php_prce.h error, you’ll need pcre3-dev package which is essentially Perl 5 Compatible Regular Expression Library – development files.

Perform the following and install PHP APC using PECL again:

[code lang=”bash”]sudo apt-get install libpcre3-dev php5-dev
sudo pecl install apc-3.1.5[/code]

And it’s done:

[code lang=”bash”]Build process completed successfully
Installing ‘/usr/lib/php5/20090626+lfs/apc.so’
install ok: channel://pecl.php.net/APC-3.1.5
configuration option “php_ini” is not set to php.ini location
You should add “extension=apc.so” to php.ini[/code]

This is tested against Ubuntu 10.04 as well as Ubuntu 10.10 environments.

You can add it to /etc/php5/conf.d/apc.ini by:

[code lang=”bash”]nano /etc/php5/conf.d/apc.ini[/code]

Add in the following codes:

[code lang=”php”]
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.shm_size=32M
apc.cache_by_default=1
apc.stat=1
apc.rfc1867=1 //For Drupal upload progress.
apc.stat=7200 //2 hours
[/code]

Watch what you retweet

You think you can just retweet something and get away with it? Well, actually you probably can. BUT not in China.

CHINESE WOMAN SENTENCED TO A YEAR IN LABOUR CAMP OVER TWEET

Cheng disappeared ten days later, on what was to be her wedding day, her whereabouts unknown until it emerged this week that she had been detained and sentenced by local police.

“Sentencing someone to a year in a labour camp, without trial, for simply repeating another person’s clearly satirical observation on Twitter demonstrates the level of China’s repression of online expression” said Sam Zarifi, Amnesty International’s Director for the Asia-Pacific.

The offending tweet was originally posted by Cheng’s fiancé Hua Chunhui, mocking China’s young nationalist demonstrators who had smashed Japanese products in protest over a maritime incident between China and Japan involving the disputed Diaoyu/Senkaku islands.

Hua’s original tweet said “Anti-Japanese demonstrations, smashing Japanese products, that was all done years ago by Guo Quan [an activist and expert on the Nanjing Massacre]. It’s no new trick. If you really wanted to kick it up a notch, you’d immediately fly to Shanghai to smash the Japanese Expo pavilion.” [Source: amnesty.org

The poor lady has been sentence to “re-education through labor.” An additional note is Twitter is blocked in China and the only way a Chinese can tweet is to go through a VPN.

An unrelated note: Chinese is a really compact written language. In 140 characters you write a sentence in English, but in Chinese you can write a short paragraph on your day.

How to rename a tag in Git

Well, first of — you can’t. You have to map a new tag to the old one then delete the old tag. Let’s assume we currently have a tag called “old_tag” and we want to replace it with a tag named “new_tag”.

To link the new tag to the old one:

[code lang=”bash”]git tag new_tag old_tag[/code]

This creates a new_tag that references the commit made by old_tag.

Now we need know how to delete the old tag in Git.

[code lang=”bash”]git tag -d old_tag[/code]

Bye old_tag. Now the thing about git is it doesn’t let you delete the tag on the remote server just as a precaution. Now you can’t do something like “git push –tags origin master” to delete the tag from the remote server.

Here’s how to do it:

[code lang=”bash”]git push origin :refs/tags/old_tag[/code]

You need to explicitly state that you want that reference updated. This will delete the tag in the remote server.

The shadow scholar

Interesting article from The Chronicle by a man who gets paid writing thesis for students:

The Shadow Scholar

The man who writes your students’ papers tells his story

You’ve never heard of me, but there’s a good chance that you’ve read some of my work. I’m a hired gun, a doctor of everything, an academic mercenary. My customers are your students. I promise you that. Somebody in your classroom uses a service that you can’t detect, that you can’t defend against, that you may not even know exists.

I work at an online company that generates tens of thousands of dollars a month by creating original essays based on specific instructions provided by cheating students. I’ve worked there full time since 2004. On any day of the academic year, I am working on upward of 20 assignments.

Read more at The Chronicle.