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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: mongodb | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the mongodb data-store | |
# Description: starts mongodb using start-stop-daemon |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: gearmand | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the gearmand job queue | |
# Description: starts gearmand using start-stop-daemon |
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
<?php | |
class BadWords | |
{ | |
public static $words = array("4r5e", | |
"5h1t", | |
"5hit", | |
"a55", | |
"anal", | |
"anus", |
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
server { | |
listen 80 default; | |
server_name bugjar.git www.bugjar.git; | |
access_log /var/log/nginx/bugjar_access.log; | |
error_log /var/log/nginx/bugjar_errors.log; | |
root /home/skyler/workspace/bugjar/public; | |
index index.php; | |
location = /favicon.ico { |
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
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
#fastcgi_pass 127.0.0.1:9000; | |
fastcgi_pass unix:/tmp/php-fcgi.sock; | |
fastcgi_index index.php; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; |
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
{% macro input_with_errors(field) -%} | |
<div class="control-group{% if field.errors %} error{% endif %}"> | |
<label class="control-label" for="{{ field.id }}>{{ field.label }}</label> | |
<div class="controls"> | |
<input type="text" class="input-large" id="{{ field.id }}" name="{{ field.name }}"{%if field.data %} value="{{ field.data|e }}"{% endif %}> | |
{%- if field.errors %}<span class="help-inline">{{ field.errors|join(' ') }}</span>{% endif %} | |
</div> | |
</div> | |
{%- endmacro %} |
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
import smtplib | |
import string | |
gmail_user = "" | |
gmail_pwd = "" | |
def send_mail(to, subject, text): | |
email = string.join(( | |
"From: %s" % gmail_user, | |
"To: %s" % to, |
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
server { | |
server_name *.coefficientrev.com *.coefficientrevenue.com; | |
rewrite ^/(.*) http://www.coefficientinc.com permanent; | |
} | |
server { | |
# Unneeded and defaults to 80? | |
#listen 80; | |
server_name www.coefficientinc.com coefficientinc.com; |
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
# Configure colors, if available. | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset='\[\e[0m\]' | |
c_user='\[\033[1;33m\]' | |
c_path='\[\e[0;33m\]' | |
c_git_clean='\[\e[0;36m\]' | |
c_git_dirty='\[\e[0;35m\]' | |
else | |
c_reset= | |
c_user= |
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 gearman import GearmanWorker | |
from traceback import format_exception, print_exception | |
from StringIO import StringIO | |
import logging | |
class ExceptionalGearmanWorker(GearmanWorker): | |
def on_job_exception(self, current_job, exception_tuple): | |
""" Override the default on_job_exception handler to log an error | |
to the console. |