curl --head http://google.com # or, the same: curl -I http://google.com
HTTP/1.1 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Tue, 24 Jan 2012 20:22:14 GMT Expires: Thu, 23 Feb 2012 20:22:14 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 219 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN
For a pure Python solution, check out this post.
This tip is from here.
“The Tesseract OCR engine was one of the top 3 engines in the 1995 UNLV Accuracy test. Between 1995 and 2006 it had little work done on it, but it is probably one of the most accurate open source OCR engines available. The source code will read a binary, grey or color image and output text. Image input is managed by the Leptonica Image Processing Library which can read a wide variety of image formats.” (source)
As so many times, the Ubuntu repos are out-of-date again :( Via apt-get you can install version 2.
The two versions can co-exist. V2 is installed to
/usr/bin/tesseract while v3 is installed to
There is a Python library for Tesseract called pytesser.
I’ve integrated pytesser in my jabbapylib library, supporting Tesseract v2 and v3 too.
Installing tesseract v3 from source is now integrated in jabbatron.
“EPUB and MOBI editions of FCM #56 are now online!
(back issues are being worked on)
Click the link beside the cover.”
I suggest using Calibre with your e-book reader. You can install it via apt-get.
Major Hayden has a nice post on SIGTERM and SIGKILL.
Here I sum it up. When you execute “
kill 123“, it sends a SIGTERM signal to process 123. In this case the process has a chance to clean up (e.g. free resources) before exiting. The brutal “
kill -9 123” sends a SIGKILL signal and terminates the process immediately, i.e. no time for cleaning up. Be nice and first try SIGTERM.
In Python, you can kill a process the following way:
import os import signal os.kill(pid, signal.SIGTERM)
Geek rap “kill -9″
At the Racker Hacker blog you can find several posts related to server administration.
You want to store some sensitive data in your Dropbox folder, e.g. passwords. How to protect these data?
I wanted to store some credentials that I wanted to access from several machines. In my Dropbox folder I created a 10 MB Truecrypt volume. I mounted it and put the sensitive data in it.
play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14
Even better if you add this to your
alias engage="play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14"
#!/bin/sh # Engage Warp Drive # Requires package 'sox' # http://www.reddit.com/r/linux/comments/n8a2k/commandline_star_trek_engine_noise_comment_from/ # odokemono # http://www.reddit.com/r/scifi/comments/n7q5x/want_to_pretend_you_are_aboard_the_enterprise_for/c36xkjx # original # play -n -c1 synth whitenoise band -n 100 20 band -n 50 20 gain +25 fade h 1 864000 1 # noname-_- # http://www.reddit.com/r/scifi/comments/n7q5x/want_to_pretend_you_are_aboard_the_enterprise_for/c373gpa # stereo # play -c2 -n synth whitenoise band -n 100 24 band -n 300 100 gain +20 # braclayrab # http://www.reddit.com/r/scifi/comments/n7q5x/want_to_pretend_you_are_aboard_the_enterprise_for/c372pyy # TNG # play -n -c1 synth whitenoise band 100 20 compand .3,.8 -1,-10 gain +20 play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14
I’ve been using 32-bit Ubuntus for years. I was always afraid of the 64-bit versions, I thought they were not yet ready. A few months ago I read that from 12.04 Canonical will recommend the 64-bit version by default. A few weeks ago I bought a new desktop machine with more than 4 GB RAM and I decided to install the 64-bit Ubuntu 11.10. I can say it works perfectly for me. I don’t have any problems with it. Flash videos work well too. So from now I also recommend the 64-bit version :)
This entry is based on this post.
I have a 64-bit Ubuntu (11.10) and I want Java support in Firefox.
My Java SE 7 update 2 is installed to
cd /usr/lib/mozilla/plugins sudo ln -s /opt/java/jre/lib/amd64/libnpjp2.so
Well, this isn’t working perfectly for me. In Firefox it appears under the Plugins tab and according to Java Tester it’s OK. However, if I visit http://java.com/en/download/help/testvm.xml, Firefox freezes :(