Usage:
SpoonDaemon.new('start', 'path/to/my/script.rb', 'tmp/pids')
# $ tweet Hi mom! | |
# | |
# Put this in ~/.bashrc or wherever. | |
# If it doesn't work, make sure your ~/.netrc is right | |
# | |
# (Thanks to @anildigital and @grundprinzip for curl-fu) | |
function tweet { | |
curl -n -d status="$*" https://twitter.com/statuses/update.xml --insecure &> /dev/null | |
echo "tweet'd" |
#!/usr/bin/env ruby | |
def output_config | |
puts <<-END | |
graph_category App | |
graph_title passenger status | |
graph_vlabel count | |
sessions.label sessions | |
max.label max processes |
#!/bin/bash | |
# | |
# Download and install libevent and memcached from source on Debian Etch or | |
# Debian Lenny. | |
# | |
# Assumptions | |
# - libevent and memcached have not been installed from apt repositories | |
# - memcached is not already running | |
# - it is ok to clobber scripts at | |
# /etc/memcached.conf |
require 'action_controller/test_process' | |
class Factory | |
module FixtureFileUpload | |
def fixture_file_upload(attr_name, path, mime_type=nil, binary=false) | |
uploaded_file = ActionController::TestUploadedFile.new( | |
Test::Unit::TestCase.respond_to?(:fixture_path) ? Test::Unit::TestCase.fixture_path + path : path, | |
mime_type, | |
binary | |
) | |
add_attribute attr_name, uploaded_file |
module Actors | |
class Manager | |
include Celluloid | |
include Celluloid::Logger | |
def initialize | |
@brokers = CONF.brokers.voip | |
@brokers.each do |broker, conf| | |
StompListener.supervise_as("#{broker}_listener".to_sym, | |
current_actor, |
Usage:
SpoonDaemon.new('start', 'path/to/my/script.rb', 'tmp/pids')
#!/bin/bash | |
REMOTE=play@SERVER_IP | |
REMOTE_APP=/home/play/PROJECT_NAME/ | |
sbt stage || exit 1; | |
rsync -va target/ $REMOTE:$REMOTE_APP/target; | |
ssh $REMOTE "cd $REMOTE_APP; ./stop.sh"; | |
ssh $REMOTE "cd $REMOTE_APP; ./start.sh"; |
module Main exposing (..) | |
import Form exposing (..) | |
import Form.Input as Input | |
import Form.Validate exposing (..) | |
import Html exposing (..) | |
type Color | |
= Red |