[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name]
@="C:\\vim\\vim60\\gvim.exe"
Thursday, December 30, 2010
Registry Setting to View HTML Source in IE6 with GVim
Monday, December 27, 2010
Dump and Load a SVN Repository
These are the steps I took the last time I needed to move a Subversion (SVN) repository from one machine to another.
* Dump the repository to a file:
* Decompress:
* Dump the repository to a file:
svnadmin dump /path/to/repositories/projectrepo > projectrepo.dump* If your repository is large, you might want to compress it using your favorite tool. This was on Linux, so:
gzip projectrepo.dump* Transfer the repository to the target machine.
* Decompress:
gzip projectrepo.gump.gz* Create an empty repository:
svnadmin create /path/to/new/repositories/projectrepo* Load the project repository:
svnadmin load /path/to/new/repositories/projectrepo < projectrepo.dump
Friday, April 30, 2010
Recovering a Deleted Google Account
I just deleted one of my Google accounts by mistake. In panic, I done some web searching on how to restore it. This led me to this page, Why can't deleted Google accounts be recovered? . From there I was led to this form, I can't access my account. After filling in as much information as possible, and submitting the form, my account was restored approximately three hours later. Given that others seemed to have less success, I can only guess I succeed without too much trouble because I could recall some significant details about my account, in particular the date I created it, the password for it, the account creation verification number, and because I linked it to another Google account.
Labels:
Configuration,
Software,
Web
Where is Trac installed on Ubuntu Linux?
/usr/share/pyshared/trac/
Labels:
Configuration,
Linux,
Software
Saturday, March 6, 2010
Links to Free Icons for Desktop and Web Applications
I'm always on the search for free icons for my software applications. Here are some icon web sites originally compiled by [1].
* Gallery and search:
* Icon search engines:
* Galleries:
And here are some icon sets I like and have liberal licenses (compiled from [2]).
* These are particularly good for standard sized buttons and toolbars on traditional desktop applications.
- FamFamFam Mini Icons My personal favourite; been using for years. Thanks so much!.
- Brand Spanking New Mini Icons
- Farm-Fresh Web Icons
- Led Icon Set
- Web Development Icons
* A little more exotic, and perhaps more suitable for web pages or desktop applications with large buttons.
References
[1] Steven Snell, 11 Great Resources to Find Free Icons, Jan 31, 2010, http://designm.ag/resources/find-icons/
[2] Steven Snell, 35 of the Best Icon Sets for Web Designers, Dec 28, 2009, http://designm.ag/resources/icons-for-web-designers/
Wednesday, February 10, 2010
Ignore Warnings Emitted from Python
Launch python with the -W arguments.
python -W arg, where arg is action:message:category:module:lineno
This assumes python is on your path. If not, a full path is required, such as
C:\Python26\python -W arg
and on linux
Example for
#!/usr/bin/env python -W ignore::DeprecationWarning name_of_script.py
#!/usr/bin/env python -W ignore::DeprecationWarning
C|> python -?
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Options and arguments (and corresponding environment variables):
-B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x
-c cmd : program passed in as string (terminates option list)
-d : debug output from parser; also PYTHONDEBUG=x
-E : ignore PYTHON* environment variables (such as PYTHONPATH)
-h : print this help message and exit (also --help)
-i : inspect interactively after running script; forces a prompt even
if stdin does not appear to be a terminal; also PYTHONINSPECT=x
-m mod : run library module as a script (terminates option list)
-O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x
-OO : remove doc-strings in addition to the -O optimizations
-Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE
-S : don't imply 'import site' on initialization
-t : issue warnings about inconsistent tab usage (-tt: issue errors)
-u : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x
see man page for details on internal buffering relating to '-u'
-v : verbose (trace import statements); also PYTHONVERBOSE=x
can be supplied multiple times to increase verbosity
-V : print the Python version number and exit (also --version)
-W arg : warning control; arg is action:message:category:module:lineno
-x : skip first line of source, allowing use of non-Unix forms of #!cmd
-3 : warn about Python 3.x incompatibilities that 2to3 cannot trivially fix
file : program read from script file
- : program read from stdin (default; interactive mode if a tty)
arg ...: arguments passed to program in sys.argv[1:]
Other environment variables:
PYTHONSTARTUP: file executed on interactive startup (no default)
PYTHONPATH : ';'-separated list of directories prefixed to the
default module search path. The result is sys.path.
PYTHONHOME : alternate <prefix> directory (or <prefix>;<exec_prefix>).
The default module search path uses <prefix>\lib.
PYTHONCASEOK : ignore case in 'import' statements (Windows).
PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.
python -W arg, where arg is action:message:category:module:lineno
This assumes python is on your path. If not, a full path is required, such as
C:\Python26\python -W arg
and on linux
#!/usr/bin/env python -W arg
Example for
#!/usr/bin/env python -W ignore::DeprecationWarning name_of_script.py
#!/usr/bin/env python -W ignore::DeprecationWarning
C|> python -?
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Options and arguments (and corresponding environment variables):
-B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x
-c cmd : program passed in as string (terminates option list)
-d : debug output from parser; also PYTHONDEBUG=x
-E : ignore PYTHON* environment variables (such as PYTHONPATH)
-h : print this help message and exit (also --help)
-i : inspect interactively after running script; forces a prompt even
if stdin does not appear to be a terminal; also PYTHONINSPECT=x
-m mod : run library module as a script (terminates option list)
-O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x
-OO : remove doc-strings in addition to the -O optimizations
-Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE
-S : don't imply 'import site' on initialization
-t : issue warnings about inconsistent tab usage (-tt: issue errors)
-u : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x
see man page for details on internal buffering relating to '-u'
-v : verbose (trace import statements); also PYTHONVERBOSE=x
can be supplied multiple times to increase verbosity
-V : print the Python version number and exit (also --version)
-W arg : warning control; arg is action:message:category:module:lineno
-x : skip first line of source, allowing use of non-Unix forms of #!cmd
-3 : warn about Python 3.x incompatibilities that 2to3 cannot trivially fix
file : program read from script file
- : program read from stdin (default; interactive mode if a tty)
arg ...: arguments passed to program in sys.argv[1:]
Other environment variables:
PYTHONSTARTUP: file executed on interactive startup (no default)
PYTHONPATH : ';'-separated list of directories prefixed to the
default module search path. The result is sys.path.
PYTHONHOME : alternate <prefix> directory (or <prefix>;<exec_prefix>).
The default module search path uses <prefix>\lib.
PYTHONCASEOK : ignore case in 'import' statements (Windows).
PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.
Wednesday, February 3, 2010
Invalid File Name Characters (Windows, Linux)
On Windows, NTFS the following characters are not permitted [Filename, Microsoft KB 177506]:
* : < > ? \ / " |Useful to also avoid:
[ ] = + , . : ;From File Naming Conventions in Linux:
File names in Linux can contain any characters other than (1) a forward slash ( / ), which is reserved for use as the name of the root directory (i.e., the directory that contains all other directories and files) and as a directory separator, and (2) the null character (which is used to terminate segments of text). Spaces are permitted, although they are best avoided because they can be incompatible with legacy software in some cases.
Tuesday, January 26, 2010
Building a Windows Installer (wininst) for Django
The Django website does not have a Windows installer for Django (at least not for version 1.1). However, you can easily build an installer yourself.
Download django.<version>.tar.gz. Unpack (e.g. using 7-Zip), and run the following command in the directory where setup.py is located (the root of the unpacked project), say Django1.1.1.
python setup.py bdist --format=wininst
This will create the installer Django-<version>.win32.exe the dist directory.
Download django.<version>.tar.gz. Unpack (e.g. using 7-Zip), and run the following command in the directory where setup.py is located (the root of the unpacked project), say Django1.1.1.
python setup.py bdist --format=wininst
This will create the installer Django-<version>.win32.exe the dist directory.
Friday, January 22, 2010
Running Python's Distutil Created Wininst Installers (.exe) from the Commmand Line
I recently created an installer with Inno Setup that was used to launch a bunch of other installers. As such, I needed to, more or less, run those sub-installers from the command line during install and uninstall. The sub-installers were executables generated by Python's distutils using the
Given the wininst installer
wininst bdist
command (i.e. "wininst" installers for Windows).Given the wininst installer
mypymodule.1.2.exe
, to install, execute the command mypymodule.1.2.exe
. This places the files Remove
mypymodule
.exe
and wininst-
mypymodule
.log
in the root directory of the Python installation. To uninstall execute the command path/to/python/root/Remove
mypymodule
.exe -u path/to/python/root/wininst-
mypymodule
.log
.
Labels:
Distribution,
Python,
Tools
Subscribe to:
Posts (Atom)