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
{ | |
"AWSEBDockerrunVersion": 2, | |
"volumes": [ | |
{ | |
"name": "shark-cat-app", | |
"host": { | |
"sourcePath": "/var/app/current" | |
} | |
} | |
], |
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
from django.db import models | |
from django.utils.translation import ugettext | |
class PositiveBigIntegerRelDbTypeMixin(models.fields.PositiveIntegerRelDbTypeMixin): | |
def rel_db_type(self, connection): | |
if connection.features.related_fields_match_type: | |
return self.db_type(connection) | |
else: | |
return models.BigIntegerField().db_type(connection=connection) |
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
property theSavedValues : {"Put Display to Sleep", "Desktop", "Mission Control", "Application Windows"} | |
# or this can be something like | |
# property theSavedValues : {"Put Display to Sleep", "-", "-", "-"} | |
tell application "System Preferences" | |
activate | |
set current pane to pane id "com.apple.preference.expose" | |
tell application "System Events" | |
delay 1 # you might need to tweak this for your system |
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
from whoosh import index, qparser | |
def search(blah, page, length): | |
ix = index.open_dir(INDEX_DIR) | |
with ix.searcher() as s: | |
q = qparser.QueryParser("content", ix.schema).parse(blah) | |
r = s.search_page(q, page, pagelen=length) | |
t = [] | |
for res in r: | |
t.append({'field1': res['field1'], |
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
#!/usr/bin/env python | |
# I tried the notify script at http://www.simplicidade.org/notes/archives/2007/08/tip_use_growlno.html but | |
# I always received errors with it. Not being a bash guy, I wrote mine in python. | |
# To use this, just save it as something like "n" in your bin/, mark it as executable and prepend it to | |
# whatever you plan on calling. For example. | |
# nj rm -rf blah | |
import sys |