This file contains 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
_pyval() { | |
local python_cmd="print $@" | |
python -c "${python_cmd}" | |
case "$shopts" in | |
*noglob*) ;; | |
*) set +f;; | |
esac | |
unset shopts |
This file contains 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
property defaultPythonExpression : "' '.join([word.capitalize() for word in 'the green mile'.capitalize().split()])" | |
to getPythonExpressionFromUser given defaultExpresion:defaultExpression | |
return text returned of ¬ | |
(display dialog "Enter a Python expression:" with title "Python Evaluator Expression" default answer defaultExpression) | |
end getPythonExpressionFromUser | |
to getResult from pythonExpression | |
return (do shell script "python -c \"print " & pythonExpression & "\"") | |
end getResult |
This file contains 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
title | quantity | price | image1 | |
---|---|---|---|---|
1960s or 70s MOD WALLPAPER 113 ID CIGARETTE CASE WALLET | 1 | 9.99 | cig6100.jpg | |
Some other item | 2 | 10.99 | cig6101.jpg | |
And yet another item | 3 | 11.99 | cig6102.jpg |
This file contains 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
-- pastebin.workflow.applescript | |
-- | |
-- An automator workflow to copy selected text to pastebin.com | |
-- | |
-- Created by Marc Abramowitz | |
-- December 5, 2010 | |
-- version 1.0 | |
on run {input} | |
This file contains 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
#!/usr/bin/env python | |
import getpass, mechanize, optparse, os.path, sys | |
parser = optparse.OptionParser() | |
parser.add_option('--login') | |
parser.add_option('--password') | |
parser.add_option('--filename') | |
parser.add_option('--description') | |
parser.add_option('--private', action='store_true', default=False) |
This file contains 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
#!/usr/bin/env python | |
from sys import argv | |
from hashlib import sha1 | |
from cStringIO import StringIO | |
class githash(object): | |
def __init__(self): | |
self.buf = StringIO() |
This file contains 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
diff --git a/lesspipe.sh.in b/lesspipe.sh.in | |
index 00b40fc..2e620f4 100755 | |
--- a/lesspipe.sh.in | |
+++ b/lesspipe.sh.in | |
@@ -506,13 +506,20 @@ isfinal() { | |
exit 1 | |
elif [[ "$1" = *directory* ]]; then | |
echo "==> This is a directory, showing the output of" | |
- echo "ls -lA $2" | |
# color requires -r or -R when calling less, not recommended |
This file contains 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
#!/usr/bin/env python | |
# A demonstration of the difference between a regular (unordered) dictionary | |
# and collections.OrderedDict | |
# See http://docs.python.org/library/collections.html#collections.OrderedDict | |
from collections import OrderedDict | |
def unordered_dict(dict_type): | |
d = dict_type() |
This file contains 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
LOAD_OPTIONAL_APPS = True | |
if LOAD_OPTIONAL_APPS: | |
# <copypaste from="http://blog.jupo.org/post/586256417/optional-django-apps"> | |
# Define any settings specific to each of the optional apps. | |
# | |
import sys | |
USE_SOUTH = not (len(sys.argv) > 1 and sys.argv[1] == "test") | |
DEBUG_TOOLBAR_CONFIG = {"INTERCEPT_REDIRECTS": True} |
OlderNewer