In no particular order:
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Easier umlauts</name> | |
<appendix>Use left-control + vowel</appendix> | |
<identifier>private.easier_umlauts</identifier> | |
<autogen> | |
__KeyToKey__ | |
KeyCode::A, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L, |
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
-- See article here: http://daringfireball.net/2007/07/simple_inbox_sweeper | |
-- The following should be one long line: | |
set _description to "All unflagged, read messages in each IMAP account | |
inbox will be moved to the “Archive” mailbox corresponding to that | |
account. This action is not undoable." | |
tell application "Mail" | |
display alert "Archive read messages from IMAP inboxes?" buttons ¬ | |
{"Cancel", "Archive"} cancel button 1 message _description |
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
require 'typhoeus' | |
class ImageDownloader | |
# Returns an array of images at the given `urls`. | |
# Each element is either a StringIO representation of an image | |
# or nil if the image could not be downloaded for any reason. | |
# | |
# Params: | |
# urls - an array of URLs pointing to images |
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
(* | |
# DESCRIPTION # | |
This script files the selected Mail messages to the specified folder (Action, by default). | |
# LICENSE # | |
Created by Dan Byler (contact: dbyler@gmail.com); released as public domain. | |
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
# config/initializers/email.rb | |
# Monkey-patch to enable ActionMailer to send STMP email over SSL. | |
# Necessitated by Fastmail mandating SSL by 30 June 2012. | |
module ActionMailer | |
class Base | |
def perform_delivery_smtp(mail) | |
destinations = mail.destinations | |
mail.ready_to_send |
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
# config/initializers/email.rb | |
require 'mail' | |
# Monkey-patch Mail to support SSL, which Fastmail mandates by 30 June 2012. | |
# | |
# Mail introduced SSL support in v2.4.0. | |
# Rails / ActionMailer doesn't use that version of Mail until Rails 3.2.0. | |
# |
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
@reboot cd /var/www/apps/myapp/current && bundle exec unicorn -c /var/www/apps/myapp/current/config/unicorn.rb -E production -D |
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 | |
# | |
# nginx - this script starts and stops the nginx daemon (Centos) | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# pidfile: /usr/local/nginx/logs/nginx.pid |
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 | |
BRANCH=$(git name-rev HEAD | cut -d' ' -f2) | |
if [ "$BRANCH" = "staging" -o "$BRANCH" = "production" ] | |
then | |
echo "You must not commit to staging or production." | |
exit 1 | |
fi |