Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.nginx</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
daemon off;
user andrew staff;
worker_processes 1;
events {
worker_connections 256;
}
error_log /usr/local/var/log/nginx/error.log notice;
require 'httparty'
class LitmusTest
include HTTParty
base_uri('https://api.litmus.com/v2')
basic_auth('<YOUR API KEY>', 'x')
headers({'Content-Type' => 'application/json'})
def self.create(subject, body)
post('/emails', :body => {:email => {:name => "#{subject} @ #{Time.now.to_s(:short)}", :subject => subject, :body => body, :client_ids => self.client_ids}}.to_json)
date {
# May 08 10:18:18 or May 8 10:18:18
match => ["timestamp", "MMM dd HH:mm:ss", "MMM d HH:mm:ss"]
target => "timestamp"
}
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
#
# Sphinx/Ultrasphinx user-configurable options.
#
# Copy this file to RAILS_ROOT/config/ultrasphinx. You can use individual
# namespaces if you want (e.g. development.base, production.base,
# test.base). Note that ERb is also allowed.
#
# This file should not be handed directly to Sphinx. Use the rake task
#
# rake ultrasphinx::configure
SELECT content_items.id id, 'ContentItem' AS class, 7 AS class_id, CAST(GROUP_CONCAT(DISTINCT comments.body SEPARATOR ' ') AS CHAR) AS comments, UNIX_TIMESTAMP(content_items.created_at) AS created_at, CONCAT_WS(' ', content_items.description, content_items.filename) AS description, content_items.title AS title, UNIX_TIMESTAMP(content_items.updated_at) AS updated_at FROM content_items JOIN (comments, discussions) ON (content_items.id = discussions.target_id AND discussions.target_type = 'ContentItem' AND comments.discussion_id = discussions.id) GROUP BY content_items.id
HISTFILESIZE=1000000000
HISTSIZE=1000000
PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
# Faster Navigation
alias ll='ls -al'
alias search=grep
alias mc='mc -c'
alias ..='cd ..'
@loe
loe / gist:9847
Created September 10, 2008 07:35
<?php
$gallery_basedir = "/var/www/gallery.andrewloe.com/";
// Gallery requirements
if (!isset($gallery_basedir))
{
$gallery_basedir = './';
}
@loe
loe / gist:10106
Created September 10, 2008 23:44
Event Create (0.000279) INSERT INTO `events` (`event_category_id`, `verb`, `target_id`, `info`, `obfuscated_id`, `actor_id`, `notifications_made`, `send_to_salesforce`, `system_only`, `deleted`, `actor_type`, `target_type`, `created_at`, `detail`) VALUES(6, 'create', 164, '', 'e80adad2fd472530ab7d7c22aef24e012ef71d83', 2, 0, 1, 0, 0, 'User', 'Hub', '2008-09-10 23:44:17', '$0 poked the Hub $1')
WARN: publish_to_queue on line 192 of /Users/Andrew/Projects/macchiato/app/models/event.rb:
Wed Sep 10 16:44:17 -0700 2008: HEY THIS SHOULD HAPPEN AFTER EVENT PARTS!
SQL (0.000605) COMMIT
EventPart Columns (0.001536) SHOW FIELDS FROM `event_parts`
SQL (0.000083) BEGIN
EventPart Create (0.000185) INSERT INTO `event_parts` (`event_id`, `obj_type`, `obj_id`, `order`, `obfuscated_id`, `deleted`) VALUES(2393, 'User', 2, 0, 'f4df422e662da8e9829d93137a164b15879d4db6', 0)
SQL (0.000637) COMMIT
SQL (0.000511) BEGIN
EventPart Create (0.000282) INSERT INTO `event_parts` (`event_id`, `obj_ty