Wordpress - notfaq.wordpress.com - Not So Frequently Asked Questions
General Information:
Latest News:
Unix/Linux — Ubuntu/Debian — lock package version 12 Oct 2011 | 06:12 am
In order to lock a package to a specific version and refrain it from being upgraded do: sudo -s echo PACKAGE_NAME hold | dpkg –set-selections To verify the settings for a package to: sudo -s dpkg...
Unix/Linux — .Xdefaults in X-Win32 28 Feb 2011 | 01:22 pm
In order to be able to use your .Xdefaults file in X-Win32 you have to do the following. Copy your .Xdefaults file to C:\Users\USERNAME\AppData\ Local\StarNet\X-Win32\Xdefaults. Where USERNAME is you...
Unix/Linux — Insert TAB in command 20 Nov 2010 | 10:30 am
If you need to run a command which requires you to insert a TAB, press Ctrl-V TAB to insert it. This could be useful when you want to grep for TAB or split lines of a TAB separated file with cut.
Suversion — Change repository URL 2 Aug 2010 | 04:13 pm
If you have checked out a repository and the repository URL has changed, you can update the URL using the svn switch command. For example: Old URL: https://www.oldrepo.com/svn/ New URL: https://www....
Emacs — ispell — No word lists (Ubuntu) 17 Nov 2008 | 05:54 pm
In Ubuntu, if you get: Error: No word lists can be found for the language “en_US”. when trying to start ispell (e.g., M-x ispell-buffer) from Emacs, then you need to install the aspell-en package: ...
Emacs — Using rectangles 13 Nov 2008 | 09:40 am
In Emacs, you can not only select by lines, but also by columns. If you select by columns, the selection is called a rectangle. You can use rectangles with the following shortcuts: C-@ or C-Space — s...
C/C++ — Insert sequential values into container 8 Nov 2008 | 04:37 pm
To insert sequential values into a container, you could use the iota function available in ext/numeric header. For example: #include <ext/numeric> #include <vector> … std::vector<int> v(5); __gnu...
Python — Convert string to HTML/XML entities 19 Oct 2008 | 09:31 am
In order to convert a string to HTML/XML entities you can use: ”.join(['&#%d;' % ord(ch) for ch in text]) For example if text=’mailto’ the output would be: ‘& #109;& #97;& #105;& #108;& #116;& #111...
Unix/Linux — Swap Ctrl and Caps Lock in X11 27 Apr 2008 | 04:30 pm
In order to swap the Ctrl and Caps Lock keys in X11, you can add the following line in Section “InputDevice” of file /etc/X11/xorg.conf: Option “XkbOptions” “ctrl:swapcaps” If you woud like to keep ...
Unix/Linux — generate large file 12 Apr 2008 | 05:37 am
In order to generate a large file of a set size you can use: dd if=/dev/zero of=test100M.bin bs=100000000 count=1 where of is the output file and bs is its size in bytes.