Sunday, January 30, 2011

sqlite dump

copied from http://stackoverflow.com/questions/75675/how-do-i-dump-the-data-of-some-sqlite3-tables

You don't say what you wish to do with the dumped file.

I would use the following to get a CSV file, which I can import into almost everything

.mode csv 
.header on 
.out file.dmp 
select * from emp;

If you want to reinsert into a different SQLite database then:

.mode insert 
.out file.sql 
select * from em

compile sqlite3 to be a shared library


gcc -c -fPIC sqlite3.c
# gcc -shared -o libsqlite3.so -fPIC sqlite3.o 
gcc -shared -o libsqlite3.so -fPIC sqlite3.o -ldl -lpthread

Wednesday, January 12, 2011

cd 2 iso on mac

mac, cd to iso 

hdiutil makehybrid -iso -joliet -o Master.is XXXX

XXXX is the folder that might show on the desktop

pdfcrop2 absolute mode

using pdfcrop2 under absolute mode,
you can crop from any rectangular area from a pdf file: paper size - margins