Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

August 13 2015

Linux(CentOS) – check Network cards(NIC) with device name

May 29 2015

Setup nodejs project on Cloud9 and Heroku
install jekyll on mac

February 17 2015

Fail to Access Google App Engine(GAE)?

June 23 2014

Steps to enable telnet client in Windows 7

November 19 2013

July 06 2013

install Matplolib into Window (2013)

In 2013, Enthought enhanced its EPD and re-branded it as “Canopy”. It includes Python packages  Numpy, Scipy, IPython,Matplotlib, Pandas, Traits, Enaml. Although free version only has 32-bits version. It is enough for normal daily usage. You can download the free version “Canopy Express” in following link:

https://www.enthought.com/downloads/

run the “canopy-1.0.3-win-32.msi” to do the installation.

However, I believe it is some issue on the kit, please don’t click on the “update” on the “welcome to Canopy” window. I tried once, the update is never finished and also it broke the dependency on pylab. I took me some time to search the internet to solve it ( the solution is manually update the numpy to a  newer version).


June 28 2013

Linux command – sort text file by specific column

“sort” command can specific column (“-k”) and delimiter (“-t”). Also, it can use “-n” option to specific numeric-sort.

For example:

> cat t
New,1390476,1,09:00:25,1,AAA05
New,530957,1,09:00:25,1,AAA07
New,701097,1,09:00:30,1,AAA09
New,629508,1,09:00:34,1,AAA11
New,500058,1,10:00:30,1,AAA12
New,682789,1,09:00:32,1,AAA13
New,562234,1,09:00:32,1,AAA14
New,618184,1,11:00:32,1,AAA15
New,816919,1,09:00:35,1,AAA16
New,515249,1,09:00:35,1,AAA17


> sort -k4 -t"," t
New,1390476,1,09:00:25,1,AAA05
New,530957,1,09:00:25,1,AAA07
New,701097,1,09:00:30,1,AAA09
New,682789,1,09:00:32,1,AAA13
New,562234,1,09:00:32,1,AAA14
New,629508,1,09:00:34,1,AAA11
New,816919,1,09:00:35,1,AAA16
New,515249,1,09:00:35,1,AAA17
New,500058,1,10:00:30,1,AAA12
New,618184,1,11:00:32,1,AAA15

source : http://stackoverflow.com/questions/1037365/unix-sort-with-tab-delimiter


June 01 2013

Linux command – list all network connections

How to list all network connections (including which app they belong to)?

lsof -i -nP

refer : http://theprofessionalspoint.blogspot.in/2013/05/10-interesting-unix-commands-you-should.html


Tags: linux

January 17 2013

Send mail using “sendmail”

Just a note for myself about how to send mail using “sendmail”

mail.sh


#/bin/sh
mail_file="/tmp/tmp.email"
cat > "$mail_file" <<-EOT
From: no-reply@(....)
To: someone@(....)
Cc:
Subject: testing
MIME-Version: 1.0
Content-Type: testing subject
 
something..
EOT
 
sendmail -t < "$mail_file"

 


October 30 2012

Java – file.renameTo() return false

In one of my program, the file.renameTo() returned false and failed to rename/move the file. However, it worked on other linux servers and window env.

File tmp = null;
tmp = File.createTempFile(report.getName(), null)
//.. do somthing...
tmp.renameTo(otherfile)

After some googling, I find the problem here.

The root caused is, renameTo() only works in same filesystem (or same disk). In my case, the tmp and otherfile is on two different disks, that why it return false.

I check the Java Doc , although it did mention, I think it should be highlighted or explain in more details.

Below is extracted from Javadoc.

public boolean renameTo(File dest)

Renames the file denoted by this abstract pathname.
Many aspects of the behavior of this method are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful.


June 22 2012

RDC – “because of a protocol error, this session will be disconnected”

I had problem to connect to remote server using remote desktop. It popped up dialog said:
“because of a protocol error, this session will be disconnected. Please try connecting to the remote computer again”

It could not resolved even reboot the server. Finally I found the solution from following
http://computerboom.blogspot.hk/2008/08/solution-because-of-protocol-error-this.html

It is resolved after I uncheck the “Theme” in the remove desktop connection “experience” options.


July 05 2011

ultrasurf – free proxy to America

logo

Ultrasurf is a product of Ultrareach Internet Corporation. Originally created to help internet users in China find security and freedom online, Ultrasurf has now become the world’s most popular pro-privacy, anti-censorship software, with millions of people using it to bypass firewalls and protect their identity online.

http://www.ultrareach.com/


May 27 2011

Tomcat 6: How to change the ROOT application

1) unzip tomcat.zip to a directory

2) setup JAVA_HOME environment variable

3) create following file, named as “ROOT.xml” in conf/Catalina/localhost/

<docBase="[path to your htdocs]"
path=""
override="true"
debug="1"
privileged="true"
allowLinking="true"
reloadable="false">

4) restart tomcat

reference : http://stackoverflow.com/questions/715506/tomcat-6-how-to-change-the-root-application


Tags: tomcat

April 18 2011

Install matplotlib into Window

matplotlib is a excellent tool for plotting chart. It is very easily to install into window environment. I am using python 2.6 in Window 7.

1) Download numpy

http://sourceforge.net/projects/numpy/files/NumPy/1.5.1/

binary: numpy-1.5.1-win32-superpack-python2.6.exe

2) Download matplotlib 1.0.1

http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/

matplotlib-1.0.1.win32-py2.6.exe

3) Installation
Execute: numpy-1.5.1-win32-superpack-python2.6.exe
Execute: matplotlib-1.0.1.win32-py2.6.exe

4) Testing
start python console and typo in following:
from pylab import *
plot(range(10))
show()

then you should see a new window with a line chart like this:


January 29 2011

AKG K702

 

I purchased a AKG K702 for few months. It was introduced by my fans in Music industry.

It is comfortable to wear and great sound. What I like the most is, not like the other headphones, it does sound the original, without unnecessary bloom on the high/low frequency.

It has more reasonable price than the other.

when browse the youtube, I find a interesting video about how it’s  made.

Now, I need to find a better sound source for it :) .


Tags: music AKG

January 03 2011

ericyung
0322 c5f6
Reposted bysuperflytherivernymph
ericyung
ericyung
0220 93b5 500
ericyung
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!

Schweinderl