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
var http = require('http'), | |
faye = require('faye'); | |
var bayeux = new faye.NodeAdapter({mount: '/bayeux', timeout: 20}), | |
port = process.argv[2] || '8000' | |
var server = require('http').createServer(function(req, res){ | |
res.writeHead(200, {'Content-Type':'text/html'}); | |
res.end(); | |
}); |
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
+---------------+------------+---------+-----------+--------------+------------+-----------+------------+-----------------+---------+------------+-------------+ | |
| Name | InstanceID | State | Flavor | Image | AZ | Public IP | Private IP | Created At | Volumes | Elastic IP | launchable? | | |
+---------------+------------+---------+-----------+--------------+------------+-----------+------------+-----------------+---------+------------+-------------+ | |
| node-simple-0 | i-9b59eaff | pending | c1.medium | ami-e358958a | us-east-1d | | | 20120309-232032 | | | - | | |
+---------------+------------+---------+-----------+--------------+------------+-----------+------------+-----------------+---------+------------+-------------+ | |
Waiting for servers: | |
0/1 | | 0:51 node-simple-0: Syncing to cloud | |
node-simple-0: attaching volumes | |
node-simple-0: labeling |
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
bash "install npm packages" do | |
user "root" | |
code <<-EOH | |
cd / | |
mkdir -p /data | |
EOH | |
user "root" | |
cwd "/data" | |
code <<-EOH | |
echo "INSTALL NODE PACKAGES" |
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
require "uri" | |
require "net/http" | |
require 'mime/types' | |
require 'crack/xml' # for just xml | |
class ImportsController < ApplicationController | |
$settings = {:username => '', | |
:password => '', | |
:space_url => '', | |
:file_path=>"#{File.expand_path(Rails.root)}/data/sweetyhigh_files/sweetyhigh/projects/87977-sweetyhightheg/tickets"} |
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
app = node.run_state[:current_app] | |
directory app['deploy_to'] do | |
owner app['owner'] | |
group app['group'] | |
mode '0755' | |
recursive true | |
end | |
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
{ | |
"id": "node_app", | |
"server_roles": [ | |
"node_app" | |
], | |
"type": { | |
"node_app": [ | |
"node" | |
] | |
}, |
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
[global] | |
dns proxy = No | |
log file = /var/log/samba/%m.log | |
load printers = No | |
smb ports = 139 | |
server string = Dev Server | |
unix password sync = yes | |
workgroup = WORKGROUP | |
domain master = Yes | |
encrypt passwords = true |
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
[global] | |
dns proxy = No | |
log file = /var/log/samba/%m.log | |
load printers = No | |
smb ports = 139 | |
server string = Dev Server | |
unix password sync = yes | |
workgroup = WORKGROUP | |
domain master = Yes | |
encrypt passwords = true |
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
=> #<HTTParty::Response:0x7fb5b9a2a708 @parsed_response="{\"order\":{\"shipping_methods\":[{\"shipping_method\":{\"id\":1,\"name\":\"No Shipping\",\"cost\":\"0.0\"}}],\"id\":42,\"number\":\"R161885070\",\"item_total\":\"0.0\",\"total\":\"0.0\",\"state\":\"delivery\",\"adjustment_total\":\"0.0\",\"credit_total\":\"0.0\",\"user_id\":1,\"created_at\":\"2012-08-17T00:47:58Z\",\"updated_at\":\"2012-08-17T00:48:09Z\",\"completed_at\":null,\"payment_total\":\"0.0\",\"shipment_state\":null,\"payment_state\":\"paid\",\"email\":\"test@test.com\",\"special_instructions\":null,\"bill_address\":{\"id\":11,\"firstname\":\"test\",\"lastname\":\"test\",\"address1\":\"644 s saltair ave\",\"address2\":null,\"city\":\"Los Angeles\",\"zipcode\":\"90049\",\"phone\":\"555-555-5555\",\"company\":null,\"alternative_phone\":null,\"country_id\":214,\"state_id\":276110813,\"state_name\":null,\"country\":{\"id\":214,\"iso_name\":\"UNITED STATES\",\"iso\":\"US\",\"iso3\":\"USA\",\"name\":\"United States\",\"numcode\":840},\"state\":{\"a |
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
upstream unicorn-staging { | |
server unix:/data/appname/staging/current/tmp/sockets/unicorn-staging.sock fail_timeout=0; | |
} | |
server { | |
listen 80 deferred; | |
listen 443; | |
ssl on; | |
root /data/appname/staging/current/public; | |
server_name foo; |
OlderNewer