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
module Middleware | |
class Logger | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
headers = env.select {|k,v| k.start_with? 'HTTP_'} | |
.map {|pair| [pair[0].sub(/^HTTP_/, ''), pair[1]].join(": ")} | |
.sort |
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 | |
set -e | |
FILE_COUNT=0 | |
check_env() { | |
if [ -z $CC_TEST_REPORTER_ID ] | |
then | |
echo "Please set CC_TEST_REPORTER_ID variable." |
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/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
!! | |
%head | |
%title SiteName | |
= stylesheet_link_tag 'screen' | |
= stylesheet_link_tag 'print' | |
/[if IE] | |
= stylesheet_link_tag 'ie', :media => 'screen, projection' | |
= stylesheet_link_tag 'custom' | |
= javascript_include_tag :defaults | |
= csrf_meta_tag |
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
# lifted from http://cheat.errtheblog.com/s/git | |
# paste into terminal | |
git config --global color.ui auto | |
git config --global color.branch.current "yellow reverse" | |
git config --global color.branch.local yellow | |
git config --global color.branch.remote green | |
git config --global color.diff.meta "yellow bold" |
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
module DataMapper | |
module Search | |
module SearchMethods | |
# Used in a DM model to provide o search method like SearchLogic | |
# class BlogPost | |
# include DataMapper::Resource | |
# extend DataMapper::Search::SearchMethods | |
# property :id, Serial | |
# property :created_on, Date | |
# end |
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
AuthType Basic | |
AuthName "Private" | |
AuthUserFile /usr/home/safire5/usr/local/etc/httpd/vhosts/deandrazninpr/docs/.htpasswd | |
require valid-user | |
# ENABLE DIRECTORY VIEWS | |
Options +Indexes | |
# STRONG HTACCESS PROTECTION | |
<Files ~ "^.*\.([Hh][Tt][Aa])"> |
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
var the = 'part of speech'; | |
var sorry = "yeah i'm pretty sure this doesn't make sense."; |