Skip to content

Instantly share code, notes, and snippets.

@herbmann
herbmann / test.log
Created May 26, 2011 19:13
Restoring file position on the Desktop
hmann@SAL9000:~/Desktop$ cp .DS_Store .DS_Store_backup
hmann@SAL9000:~/Desktop$ # SORT BY NAME - IRRITATING MISTAKE
hmann@SAL9000:~/Desktop$ cp .DS_Store_backup .DS_Store
hmann@SAL9000:~/Desktop$ killall Finder
hmann@SAL9000:~/Desktop$ # EVERYTHING BACK WHERE IT BELONGS
hmann@SAL9000:~/Desktop$
This also works for copying old .DS_Store files out of Time Machine backups.
@herbmann
herbmann / .screenrc
Created May 30, 2011 02:22
My Simple screenrc
startup_message off
backtick 1 3600 3600 whoami
caption always "%{= wk} %{= bW}[%1`@%H]%{= wk} %-Lw%{= bW}%50>%n%f* %t%{-}%+Lw%{= wk} %= %{= bW}[%l]%{= wk} "
@herbmann
herbmann / crontab-template
Created June 25, 2012 19:14
Comment for the top of your crontab files
MAILTO=sysadmin@example.com
####################################################################
#minute (0-59), #
#| hour (0-23), #
#| | day of the month (1-31), #
#| | | month of the year (1-12), #
#| | | | day of the week (0-6 with 0=Sunday)#
#| | | | | commands #
####################################################################
@herbmann
herbmann / DropboxSync.py
Last active December 16, 2015 00:28 — forked from freekrai/DropboxSync.py
Syncing Dropbox with Pythonista for iPad/iPhone. (See http://rogerstringer.com/2012/12/03/useful-pythonista-links/ for details.) This edit is designed to fix a recursive directory delete issue.
import os
import sys
import pickle
import console
from collections import namedtuple
import dropboxlogin # this code can be found here https://gist.github.com/4034526
STATE_FILE = '.dropbox_state'