As often, a quick reminder for me. I’m using the Oracle Instaclient on my Mac without a tnsnames.ora and i keep forgetting the connectstring syntax:
sqlplus USER/PASS@//HOST:PORT/SID
Extra bonus points: Through in rlwrap to get a nice commandline history and completion as used to in a standard shell:
rlwrap sqlplus USER/PASS@//HOST:PORT/SID
Share This
Just a quick reminder:
To revert a complete working copy or a single file use:
svn merge -rHEAD:PREV .
# or
svn merge -rHEAD:PREV path/to/file
svn commit -m "reverted"
Share This
Next time i see umlauts in source, I’ll scream. Loud.
In the mean time I try this:
find . -iname "*.java" -exec sh -c 'iconv -f cp1252 -t utf-8 {} > {}.utf8' \;
for i in `(find . -name "*.utf8")`; do mv $i ${i/.utf8/}; done
Before you try this, make a backup of your files. It worked for me but i don’t guaranty that your files won’t vanish.
Share This
I found no fancy graphical xml validator on OS X, but this isn’t a problem.
OS X includes libxml which comes with xmllint.
To validate a xml file against a schema:
xmllint --noout --schema sitemap.xsd sitemap.xml
Share This
After a server crash a wanted to compare all actual files with the backuped data. An easy way is to compare the md5 hashes like that:
First create recursively md5 hashes from all files in that directory:
find ./backup -type f -print0 | xargs -0 md5sum > /checksums_backup.md5
Then check the actual data:
md5sum -c checksums_backup.md5
I was lucky, no files where damaged.
Share This