Posts from 2011-06
Easiest way using the Ubuntu/Debian package nautilus-image-converter:
sudo apt-get install nautilus-image-converter
Using a Custom Photo Resize Script for the Nautilus File Manager
This context menu script can resize to 3 predefined sizes (more can be added) and it asks to put the resized pics in a folder or rename them....
- Use the Freeware ThumbsUp (not from context menu but via drag and drop)
- or create your own services menu.
Windows 7 ships with v2.0 of the Windows PowerShell. On a German Win7 installation you can start it via Start → Alle Programme → Zubehör → Windows PowerShell → Windows PowerShell (ISE).
Owner's manual: http://technet.microsoft.com/en-us/library/ee221100.aspx
Translating Simple DOS Commands to Powershell cmdLets<table class="table...
Debian/Ubuntu offers Cherokee packages but they are quite outdated for the stable branch. So you may want to prefer the manual installation from source.
Manual Installation From Source
The easy way of installation:
wget http://cherokee-project.com/install && python install
or get the source and compile it yourself:
If you frequently have to create Markdown documents, you might want your text editor of choice to support you. Jean-Philippe Fleury developed a nice plugin for Gedit to...
cd ~/Downloads curl -C - -O http://synergy.googlecode.com/files/synergy-1.4.5-MacOSX107-x86_64.dmg open synergy-1.4.5-MacOSX107-x86_64.dmg cd /Volumes/Synergy/ cp -r Synergy.app /Applications/
Start the server:
synergys -f --config ~/synergy.conf
# sample synergy configuration file # # comments begin with the # character and continue to the end of line. # comments may appear anywhere the syntax...
Yesterday, I had to prepare for an exam at the University but instead of learning for it I wrote a small tool to browse the unicode characters. You can have a look at it on http://pklaus.github.com/js-Unicode-Selector. It's fun...
The Bash is probably the most important shell and scripting language in the world as it is included with almost any operating system (excl. MS Windows). The automation that can be achieved with very predictable results is great even though the complexity of the scripts is somehow limited. Doing calculations...
On Wikipedia there is a Comparison of (x86) assemblers. You can sort the table by x86_64 capability.
Most x86 assemblers use Intel syntax. Here is a little comparison: http://asm.sourceforge.net/articles/linasm.html#Syntax
Most widely used assembler syntax.
At the end of the mnemonics you put a size suffix (one letter). To change...
Operators in C
Operators in C and C++: http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B
C supports a rich set of operators, which are symbols used within an expression to specify the manipulations to be performed while evaluating that expression. C has operators for:
- arithmetic (
- equality testing (
- order relations (
The AppleScript Editor shipped with Mac OS X (or XCode...) PreFab UI Browser http://pfiddlesoft.com/uibrowser/ Script Debugger 4.5 http://www.latenightsw.com Smile http://www.satimage.fr/software/en/smile/index.html
Run a Terminal Command
set hostname to "www.apple.com" do shell script "ping -c1 " & hostname
I had a nasty problem with Piwik today. I use it on a low traffic website until today (updated to 1.5) I did not mind that the sparklines were not displayed. But today I wanted to fix the problem and at first I didn't come to the conclusion that <a...
The German VoIP provider Sipgate has a great offer for people who want to replace their landline with a modern internet based SIP telephony account. Sipgate offers an XML-RPC API to all its customers (you must at least have created a free 'basic' account). With the API, you...
You can use gitosis to allow people to collaborate on a project via git. Its a utility to allow read and write access based on SSH encryption keys. And you only need to create a single system account, not one for every contributor.
First, install gitosis:
su apt-get install gitosis
su easy_install virtualenv
And create your virtualenv :
mkdir ~/venv virtualenv --no-site-packages ~/venv/django-cooking source ~/venv/django-cooking/bin/activate
Now you can install a whole bunch of stuff to that virtual python environment:
easy_install django psycopg2 django-extensions werkzeug south reportlab pypdf html5lib pisa pil
When using virtualenv, you should also consider using virtualenvwrapper! It provides...
Praveen Gollakota shed light on Installing Python 2.7, easy_install, pip, virtualenv and virtualenvwrapper on Mac OS X. He gives you all the information you need if you want to use an up-to-date Python on Mac OS X! Thx!
Alternative way of installing python using homebrew:
brew install python
- In general: https://docs.djangoproject.com/en/dev/howto/deployment/
- Using an Apache webserver: mod_wsgi is the preferred method nowadays (instead of mod_python):
- Using Cherokee: http://www.cherokee-project.com/doc/cookbook_django.html
Please refer to https://docs.djangoproject.com/en/dev/topics/i18n/ for up to date information.
There are three steps on the way to Django i18n:
- For application authors wishing to make sure their Django apps can be used in different locales: Internationalization.
- For translators wanting to translate Django apps: Localization.
- For system administrators/final users...
- Documentation on the tags: https://docs.djangoproject.com/en/dev/ref/templates/builtins/
- Setup in standalone-mode (without Django): https://docs.djangoproject.com/en/dev/ref/templates/api/#configuring-the-template-system-in-standalone-mode
Using the template system, a two-step process:
- First, you compile the raw template code into a Template object.
- Then, you call the
render()method of the Template object with a given context.
Example for use in standalone-mode:
The website of the Django web framework can be found on https://www.djangoproject.com/.
The current version of Django (2011-06-13: v1.3) can be installed on Ubuntu/Debian using
sudo apt-get install python-setuptools sudo easy_install django
install-dir on Ubuntu 11.04 will be
/usr/local/lib/python2.7/dist-packages. More on the install-dir can be read in a blog...
Many devices that send & receive data via antennas give you information about their power in units of dBm. If you wan to know how to convert this unit to a power value given in mW (and vice versa) you may read on.
The formulae found in the Wikipedia article...
Today I wanted to try out the DNS Service by Hurricane Electric (including a free IPv6 DynDNS service): https://dns.he.net. I have a spare domain and tried to update my domain information to the new nameservers (from the set
ns1.he.net, ns2.he.net, ns3.he.net, ns4.he.net, ns5.he.net) at Denic, the German TLD...
Convert between plus-cylinder and minus-cylinder notation in eyeglass prescription writings using Python
Doctors in Germany usually give out prescriptions with negative values for the cylinder. Some eyeglass manufacturers list their products with plus-cylinder notation so the optometrists have to convert the notations.
If you want to convert your prescription writings, I created this online tool to convert your values:
Arkose can serve to make sandboxing easy on Ubuntu Linux. It uses LXC as technology to isolate programs that you don't trust fully.
On Natty 11.04 the installation is as simple as
sudo apt-get install arkose
Check the links below for more information.
- The developer's blog: http://www.stgraber.org/2011/01/09/sandbox-changes-name-to-become-arkose/
- The Arkose source code...
If you want to use SQlite3 databases with PHP you should probably use PDO.
Install it like this:
su apt-get install php5 php5-sqlite echo -e "\nextension=pdo.so\n" >> ../conf/php.ini
Note: You don't need any command like
pecl install pdo_sqlite or
pecl install pdo as PDO is now included in the package
update 2015-09-08: this is outdated, please refer to my new blog post instead.
Install the Google Data Library (you should consider installing it in an isolated virtualenv environment):
cd ~/Downloads curl -C - -O http://gdata-python-client.googlecode.com/files/gdata-2.0.14.tar.gz tar -xf gdata-2.0.14.tar.gz cd gdata-2.0.14 python setup.py install
Now you are ready to test the example...
Install tweepy via PyPI:
Example usage with identi.ca:
import tweepy username, password = "identi.ca_username", "identi.ca_password" auth = tweepy.BasicAuthHandler(username, password) api = tweepy.API(auth, <span...
The WordPress plugin pygments-markdown-highlighter makes the Pygments highlighter available to highlight your code blocks when writing posts in Markdown syntax.
To use it, you need to install Pygments on your web server and install the plugin itself. And you should also have PHP Markdown installed in your blog (and they...
First set the textwidth:
If you want to reformat a block of text, format it and press
gq. For example to format the following 4 lines from the current cursor position, press
v4j to enter markup mode and mark the following 4 lines).
Alternatives to Confixx, Plesk etc.
- Internet Multi Server Control Panel (i-MSCP)
- ISPConfig 3
Support seems to be a bit outdated:
- Debian 4.0 and 3.1
- Ubuntu 8.04
More general server administration
Always quite up to date.