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
# | |
# Bash completion for fabric | |
# | |
function _fab_complete() { | |
local cur | |
if [[ -f "fabfile.py" || -d "fabfile" ]]; then |
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
[Groups] | |
NumberOfGroups = 9 | |
[1] | |
TriggerTop = [Monitor1Top] | |
TriggerRight = [Monitor1Left] + [Monitor1Width] / 3 | |
TriggerBottom = [Monitor1Bottom] | |
TriggerLeft = [Monitor1Left] | |
[2] |
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
#!/bin/bash | |
# | |
# Script to find lingering PostgreSQL data files. | |
# | |
# Those files can usually be safely removed from disk. | |
# | |
# Use at your own risk! | |
# | |
# Based on http://dba.stackexchange.com/a/121876/34652 |
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
""" | |
quick-and-dirty word filter. | |
It could sure be made prettier. It's only purpose is to get the brain nudged into the right direction. | |
""" | |
BADWORDS = { | |
u'bad': u'b*d', | |
u'verybad': u'v*****d', | |
u'disgusting': u'#*$&^$%' |
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
Buildfile: /home/exhuma/work/__libs__/plovr/build.xml | |
pre-compile: | |
compile: | |
[mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/classes | |
[mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles | |
[mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles/com/google/template/soy/exprparse | |
[mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles/com/google/template/soy/soyparse | |
[javacc] Java Compiler Compiler Version 5.0 (Parser Generator) |
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
Buildfile: /home/exhuma/work/__libs__/plovr/build.xml | |
pre-compile: | |
compile: | |
[mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/classes | |
[mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles | |
[mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles/com/google/template/soy/exprparse | |
[mkdir] Created dir: /home/exhuma/work/__libs__/plovr/closure/closure-templates/build/genfiles/com/google/template/soy/soyparse | |
[javacc] Java Compiler Compiler Version 5.0 (Parser Generator) |
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
def put_contents(value, remote_file, with_sudo=False): | |
""" | |
Uploads the contents of a variable to a remote file in a safe manner. | |
This will run ``mktemp`` on both the local and remote machine to reserve | |
unique temporary file names. Once the names are reserved, the file contents | |
are written as binary data into the local temp file. This local file is | |
then uploaded to the remote temp file and ultimately moved to the desired | |
destination. |
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
-- The following query conbines the task due-date with the priority and sorts with the combined value. | |
SELECT id, project_id, subject, due_date, status_id,priority_id,author_id, priority_id * EXTRACT(EPOCH FROM AGE(due_date)) | |
FROM issues | |
WHERE assigned_to_id=3 OR | |
author_id=3 AND | |
status_id IN (SELECT id FROM issue_statuses WHERE NOT is_closed) | |
ORDER BY (priority_id * EXTRACT(EPOCH FROM AGE(due_date))) DESC NULLS LAST, | |
priority_id DESC; |
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
class RepresentableBase(object): | |
""" | |
This class can be used by ``declarative_base``, to add an automatic | |
``__repr__`` method to *all* subclasses of ``Base``. This ``__repr__`` will | |
represent values as:: | |
ClassName(pkey_1=value_1, pkey_2=value_2, ..., pkey_n=value_n) | |
where ``pkey_1..pkey_n`` are the primary key columns of the mapped table | |
with the corresponding values. |
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
clear && curl http://localhost:5000/foo+bar | |
curl http://localhost:5000/foo%20bar |