Here is a nice little tidbit I ran across some time ago… Ever delete a bunch of files from a git working copy, and then had to go in and tell git that you meant to delete them? For example: [jason@dc40 AppStruct]$ git status # On branch master # Changed but not updated: # (use [...]
Archive for May, 2010
git add -u
Posted in Engineering, Software, Technique, tagged git, git add, scm, version control on May 16, 2010 | Leave a Comment »
PostgreSQL Dump and Restore Notes
Posted in Open Source, Software, System Administration, Technique, tagged database backup, pg_dump, pg_restore, PostgreSQL on May 16, 2010 | Leave a Comment »
The pg_dump and pg_restore commands provide excellent flexibility in storing a compressed dump file, and selectively restoring any part of it. I’ve found that dropping and re-creating the target database is the cleanest way to restore a dumpfile — no stray relations left to cause trouble. Unless you own all of the objects being restored, [...]
Interesting Numeric Pattern
Posted in Interesting, reSearch, tagged Math, Numbers, Patterns on May 15, 2010 | Leave a Comment »
>>> for i in range(1,31): … print(‘ ‘ + ’1′*30) … print(‘x ‘ + ’1′*i) … print(‘= ‘ + str(int(’1′*30) * int(’1′*i))) … print() … 111111111111111111111111111111 x 1 = 111111111111111111111111111111 111111111111111111111111111111 x 11 = 1222222222222222222222222222221 111111111111111111111111111111 x 111 = 12333333333333333333333333333321 111111111111111111111111111111 x 1111 = 123444444444444444444444444444321 111111111111111111111111111111 x 11111 = 1234555555555555555555555555554321 111111111111111111111111111111 x 111111 = 12345666666666666666666666666654321 [...]