This was a test with Poltergeist I did the other day
#!ruby
def polter
noop
end
###################### | |
# proxy_up.sh.erb | |
#!/bin/bash | |
echo 'Starting emproxy...' | |
sudo monit start all -g emproxy_ngin | |
echo 'Sleeping for 5s before reloading haproxy...' | |
sleep 5 | |
echo 'Reloading haproxy...' | |
/data/ngin/shared/bin/haproxy_remove |
# vim:ft=sh: | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
DARK_GRAY="\[\033[0;90m\]" |
; Ruby has an awesome feature -- string interpolation. Read about it on the internet. | |
; On the other hand, Clojure only has cumbersome Java string formatting, which can not be | |
; used without pain after you've tried Ruby. | |
; So here's this simple macro that basically allows you to do most things you could do | |
; with Ruby string interpolation in Clojure. | |
(ns eis.stuff | |
(:require [clojure.string])) |
This was a test with Poltergeist I did the other day
#!ruby
def polter
noop
end
/Users/Hal/taylor/cc-adhearsion/vendor/bundle/gems/yard-0.7.4/lib/yard.rb:38: [BUG] Bus Error | |
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0] | |
-- control frame ---------- | |
c:0021 p:---- s:0062 b:0062 l:000061 d:000061 CFUNC :callcc | |
c:0020 p:0080 s:0059 b:0059 l:001850 d:001850 TOP /Users/Hal/taylor/cc-adhearsion/vendor/bundle/gems/yard-0.7.4/lib/yard.rb:38 | |
c:0019 p:---- s:0056 b:0056 l:000055 d:000055 FINISH | |
c:0018 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC :require | |
c:0017 p:0289 s:0050 b:0050 l:0017b8 d:0017b8 TOP /Users/Hal/taylor/cc-adhearsion/Rakefile:30 | |
c:0016 p:---- s:0048 b:0048 l:000047 d:000047 FINISH |
## Prepare ################################################################### | |
# Remove RVM | |
rvm implode | |
# Ensure your homebrew is working properly and up to date | |
brew doctor | |
brew update | |
## Install ################################################################### |
[adhearsion] | |
exten => _.,1,AGI(agi://localhost/adhearsion) |
require File.expand_path(File.dirname(__FILE__) + "/../../config/environment") | |
require 'adhearsion' | |
require 'adhearsion/initializer/asterisk' | |
require 'drb' | |
# http://help.cloudvox.com/faqs/getting-started/setup-for-ruby-adhearsion | |
desc "Make an outgoing phone call to number provided as 'call' (via Cloudvox)" | |
task :make_outgoing_call do | |
if ENV['call'] | |
# Outgoing context from Cloudvox Switchboard, under "Outgoing settings (AMI)." |
/var/log/nginx/*.log { | |
daily | |
missingok | |
rotate 52 | |
compress | |
delaycompress | |
notifempty | |
sharedscripts | |
postrotate | |
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid` |
~/$ lein new ring-on-heroku | |
Created new project in: /home/jim/Development/ring-on-heroku | |
~/$ cd ring-on-heroku | |
~/ring-on-heroku$ echo 'web: lein run -m ring-on-heroku.core' > Procfile | |
~/ring-on-heroku$ cat > src/ring_on_heroku/core.clj | |
(ns ring-on-heroku.core | |
(:use ring.util.response | |
ring.adapter.jetty)) | |
(defn app [req] |