To download files with the file name from server with curl, you need to specify this command:
curl -O -J -L
And this is the explanation of the command switch used:
-O, –remote-name Write output to a file named as the remote file
-J, –remote-header-name Use the header-provided filename (H)
-L, –location Follow redirects (H)
There is a great tool built in windows 7 so that you can check your laptop status very quickly.
The name of the program is: windows mobility center. Here is a screenshot of it:
first download the source and cd to the extracted directory, you should run follow commands:
tar -zxvpf openvpn-2.3.4.tar.gz
aptitude install libssl-dev liblzo2-dev libpam0g-dev gcc make -y
For some reason ubuntu makes it very hard to login as root in desktop.
Yes, it will be more secure. But for someone just use it as sandbox to try out features, not be able to run as root will make lots of operations fail and could also require your to type in password again and again, it’s very annoying.
So let’s get our root back:
1. enable root password:
sudo passwd root
2. boot to root account by default
and make it look like this:
and make sure minimum-uid is 0
To remount read only file system on android as read write:
Here is an example:
mount -o remount,rw /dev/block/platform/msm_sdcc.3/by-num/p21 /system
The command to rename filenames to lower case is:
rename -v 'y/A-Z/a-z/' *
Change “*” to your exact folder name if you don’t mean current directory. Multiple folder names are also allowed, just list then to the end of the command line.
Auto mount a windows folder share on debian startup could be your honey if you run into this situation:
1. run linux as a website server development environment
2. most of your tools with good ui only run under windows
To bridge this gap, you want to have linux access to your windows share, and this is how to do it:
work on the windows:
- create a user “linuxweb” with the password “1y1cc1″ (please use your own values in your situation)
- share your work folder as “workproject” and make sure the user “linuxweb” you created have all the permission
work on the linux:
- create the mount point by these commands:
- setup auto mount on debian boot, run:
and add this line to the file:
mount -t cifs //192.168.1.99/workproject -o username=linuxweb,password=1y1cc1,uid=www-data,gid=www-data /website/winworkproject
There is one problem I run into during this adventure: I initially tried to auto mount the share by fstab:
//192.168.1.99/workproject /website/winworkproject cifs username=linuxweb,password=1y1cc1,uid=www-data,gid=www-data 0 0
but got an error saying:
CIFS VFS: cifs_mount failed w/return code = -112
I have no clue what code -112 is, then I have to do it by rc.local and it looks work well. Please leave a comment below if you know what code -112 is, thanks!
sendmail is very easy to install and use with php on linux. But it could be slow by default configuration. The reason which I ran into is because the server doesn’t configured with a qualified host name and it keeps retrying. To fix the issue:
and set the ip for your domain like this:
I haven’t got the whole picture of this, but this quick fix does work. Hope it could also help you if you are demand a quick solution.
List of programmer’s blog with cool stuff
Some .net related good posts: http://blog.tedd.no/
Graphical programmer: http://stereopsis.com/
Great .net programmer writes excellent codeproject article: http://www.nicolas-dorier.com/
List of platform:
Open slim: http://opensimulator.org/wiki/Main_Page
List of tools:
ilmerge, merge .net dll and exe into one: http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx
windows api monitor: http://www.rohitab.com/apimonitor
List of library:
Take directx and multimedia api to .net: http://slimdx.org/
GraphicsMagick is a folk of ImageMagick, it’s an image manipulation library, speed faster and size smaller than ImageMagick: http://www.graphicsmagick.org/
synthesia, on screen midi keyboard and even more: http://www.synthesiagame.com/
If you hate to distribute many .net assemblies, then a tool I have just discovered might be of help: ILMerge, the url is: http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx
But I don’t know a good solution that could do both obfuscation and dll merge. It’s always good to keep the stuff slim but also bug free without headache.
And good to know there is a tool called: apimonitor, http://www.rohitab.com/apimonitor, should to the thing as it’s name indicates which I always want to know about.