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
web: ruby config.ru $PORT | |
worker: bundle exec thin start -R app_name.ru --socket tmp/thin.sock -e production |
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
class MailController < ApplicationController | |
layout "none" | |
# the sendgrid notification callback. | |
def notification | |
puts params | |
u = User.where(:email => params["email"]).first | |
if params["event"] == 'bounce' | |
u.deactivate! "an invalid email address has been provided" | |
elsif params["event"] == 'spamreport' | |
u.deactivate! "a spam report was filed from your email address" |
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
When installing on mountain lion: | |
installation: | |
brew install postgresql --without-ossp-uuid | |
initd /usr/local/var/postgres | |
mkdir /var/pgsql_socket | |
chown <user> /var/pgsql_socket | |
edit /usr/local/var/postgres/postgresql.conf | |
set unix_socket_directory to /var/pgsql_socket |
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
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# alias for quick DNS cache flushing | |
alias fc='sudo dscacheutil -flushcache' | |
# enable the git bash completion commands | |
#source ~/.git-completion |
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
curl -X GET '23.21.224.90:9200/mentions/mention/_search?search_type=count&size=10&pretty' -d '{ | |
"query":{ | |
"constant_score":{ | |
"filter":{ | |
"and":[ | |
{ | |
"terms":{ | |
"keyword":[ | |
"head wraps for women", | |
"hair ornament", |