This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python 2 | |
| import datetime | |
| def getFiletime(dt): | |
| microseconds = int(dt, 16) / 10 | |
| seconds, microseconds = divmod(microseconds, 1000000) | |
| days, seconds = divmod(seconds, 86400) | |
| return datetime.datetime(1601, 1, 1) + datetime.timedelta(days, seconds, microseconds) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* | |
| Written by hypert. | |
| Based on Sean Long's "Copy Safari Tabs" (http://www.macosxhints.com/article.php?story=20060129175300877), | |
| Mark Hunte's "Save Safari Tabs" (http://www.macosxhints.com/article.php?story=20051121170745971), | |
| and Adam Brin's "Safari Tabs" (http://www.macosxhints.com/article.php?story=20040917211924222). | |
| *) | |
| property NEW_FOLDER_KEY : "n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Borg(object): | |
| """ | |
| Impementation of the Borg-Pattern. | |
| Source: http://code.activestate.com/recipes/66531/ | |
| """ | |
| __we_are_one = {} | |
| def __init__(self): | |
| self.__dict__ = self. __we_are_one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ -f ~/file.txt ]; then | |
| echo "File exists" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # will match if it has notes or twitter in them | |
| ^(?=.*(?:notes|twitter)).* | |
| # will match all that don't have notes or twitter' | |
| ^(?!.*(?:notes|twitter)).* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ -d ~/folder ]; then | |
| echo "Folder exists" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| history | awk '{print $2}' | sort | uniq -c | sort -nr | head -25 |