This is mostly a list of Mac applications, but I've included a few Web apps as well.
Alfred : Useful Application Launcher. (When Quicksilver died I switched to Alfred.)
Divvy : Grid-Based Window Manager.
class UrlValidator < ActiveModel::EachValidator | |
def validate_each(record, attribute, value) | |
valid = begin | |
URI.parse(value).kind_of?(URI::HTTP) | |
rescue URI::InvalidURIError | |
false | |
end | |
unless valid | |
record.errors[attribute] << (options[:message] || "is an invalid URL") |
#!/usr/bin/env bash | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
# a reboot after is often a good idea | |
sudo apt-get -y install build-essential libffi-dev libgdbm-dev libreadline6-dev libssl-dev libxml2 libxml2-dev libxslt-dev libyaml-dev ncurses-dev zlib1g zlib1g-dev | |
RUBY_VERSION="1.9.3-p194" | |
mkdir ~/src | |
cd ~/src |
# Currently used in a Rails 3.2.6 application | |
# | |
# Notes: | |
# * add 'faraday' to your Gemfile | |
# * put this file in '#{Rails.root}/lib/alchemy_api.rb' | |
# * `export ALCHEMY_API_KEY="..."` in your shell | |
# | |
class AlchemyAPI | |
attr_accessor :api_key, :base_url |
How to compile Gitx:
~/Library/Developer/Xcode/DerivedData/GitX-fpvndnywvssxinenuifhoszinvmk
){FOLDER}/Build/Products/Debug/GitX.app
# Derive your workers from BaseWorker, but don't use it directly. | |
class BaseWorker | |
def self.perform(params) | |
document = find_document(params) | |
return if recently_processed?(document, params) | |
pre_process(document, params) or return | |
process_and_mark_as_processed(document, params) or return | |
post_process(document, params) | |
end |
# encoding: utf-8 | |
STDOUT.sync = true | |
STDERR.sync = true | |
require 'pathname' | |
at_exit do | |
if (e = $!) && !e.instance_of?(SystemExit) | |
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape" |
##################### ElasticSearch Configuration Example ##################### | |
# This file contains an overview of various configuration settings, | |
# targeted at operations staff. Application developers should | |
# consult the guide at <http://elasticsearch.org/guide>. | |
# | |
# The installation procedure is covered at | |
# <http://elasticsearch.org/guide/reference/setup/installation.html>. | |
# | |
# ElasticSearch comes with reasonable defaults for most settings, |
free -m | |
total used free shared buffers cached | |
Mem: 989 945 43 0 8 143 | |
-/+ buffers/cache: 793 195 | |
Swap: 511 301 210 |