Skip to content

Instantly share code, notes, and snippets.

View quinn's full-sized avatar
🐁
huh

Quinn Shanahan quinn

🐁
huh
View GitHub Profile
@quinn
quinn / logger_middleware.rb
Last active October 10, 2020 04:42 — forked from skwp/logger_middleware.rb
A request/response logger Rack middleware.
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
#!bin/bash
set -e
FILE_COUNT=0
check_env() {
if [ -z $CC_TEST_REPORTER_ID ]
then
echo "Please set CC_TEST_REPORTER_ID variable."
#! /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
!!
%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
# 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"
@quinn
quinn / ping.rb
Created January 21, 2010 14:49 — forked from collin/ping.rb
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
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])">
@quinn
quinn / the.js
Created October 9, 2008 18:57 — forked from collin/the.js
var the = 'part of speech';
var sorry = "yeah i'm pretty sure this doesn't make sense.";