Skip to content

Instantly share code, notes, and snippets.

View sudara's full-sized avatar
🧪
Brewing new formulas

Sudara sudara

🧪
Brewing new formulas
View GitHub Profile
// ==========================================================================
// Listenapp.App Fixtures
// ==========================================================================
sc_require('models/nav');
Listenapp.Nav.STATIC = SC.Object.create({
// TODO: Add your data fixtures here.
// All fixture records must have a unique guid and a type matching the
// ==========================================================================
// Project: SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
// Portions ©2008-2009 Apple, Inc. All rights reserved.
// License: Licened under MIT license (see license.js)
// ==========================================================================
/** @class
TODO: Describe Class
// ==========================================================================
// Project: SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
// Portions ©2008-2009 Apple, Inc. All rights reserved.
// License: Licened under MIT license (see license.js)
// ==========================================================================
/** @class
TODO: Describe Class
SC.RecordAttribute.registerTransform(SC.DateTime, {
/** Transforms a date to an integer of milliseconds since 1970 */
/** @private - convert an int to a date */
to: function(n, attr) {
/* Transform a date coming from rails in the format 2008/12/31 10:45:23 +0200 */
return SC.DateTime.parse(n,'%Y/%m/%d %H:%M:%S');
},
/** @private - convert a date to an int */
from: function(date) {
return date.get('milliseconds');
require 'rubygems'
require 'daemons'
options = {
:app_name => "task_server",
:dir_mode => :script,
:dir => "../log", # where the log/PID file will be dropped
:ontop => false, # should be false
:mode => :exec,
:backtrace => true,
ActiveRecord::Schema.define(:version => 20091018223040) do
create_table "assets", :force => true do |t|
t.string "content_type"
t.string "filename"
t.integer "size"
t.integer "parent_id"
t.integer "site_id"
t.datetime "created_at"
t.string "title"
set :mongrel_base_port, 5000
set :mongrel_restart_delay, 30
set :mongrel_count, 2
namespace :mongrel do
task :restart, :roles => [:app], :except => {:mongrel => false} do
(mongrel_base_port..(mongrel_base_port+mongrel_count)).to_a.each do |port|
sudo "/usr/bin/monit restart mongrel_#{monit_group}_#{port}"
sleep mongrel_restart_delay
end
This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell))
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.1
# Switch to 1.9.1
∴ rvm 1.9.1
check process rabbitmq_appname
with pidfile /var/run/rabbitmq/rabbitmq.pid
start program = "/engineyard/bin/rabbitmq"
stop program = "/engineyard/bin/rabbitmq"
group rabbitmq_appname
@sudara
sudara / deploy
Created April 8, 2010 10:32 — forked from toolmantim/deploy
#!/bin/sh
# Simple deployment script
#
# Requires access to to github repository, as well as a host defined in
# ~/.ssh/config like so:
#
# Host myhost
# User appuser
# Hostname hostname