Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# | |
# OpenSSL example configuration file. | |
# This is mostly being used for generation of certificate requests. | |
# | |
# This definition stops the following lines choking if HOME isn't | |
# defined. | |
HOME = . | |
RANDFILE = $ENV::HOME/.rnd |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
--Start Time--Time Elapsed--CDR query time(ms)--Events read per Interval--Events Read--Events Processed--Events Sent--CPU Usage--Load Average-- | |
--01/11/18 07:15:50--61--248--24--24--24--23--63.48--0.46 0.15 0.09 4/190 23586 | |
-- | |
^C | |
deploy@policy-router-test-server-3:/srv/apps/policy_router/current$ ^C | |
deploy@policy-router-test-server-3:/srv/apps/policy_router/current$ tail -f tmp/benchmark_2018_01_11_07_1 | |
benchmark_2018_01_11_07_14_49.txt benchmark_2018_01_11_07_17_59.txt | |
deploy@policy-router-test-server-3:/srv/apps/policy_router/current$ tail -f tmp/benchmark_2018_01_11_07_17_59.txt | |
--Start Time--Time Elapsed--CDR query time(ms)--Events read per Interval--Events Read--Events Processed--Events Sent--CPU Usage--Load Average-- | |
--01/11/18 07:19:00--61--5018--1846--1846--1846--1845--34.6--1.00 0.52 0.25 2/194 23882 |
<%= form_tag '#', class: 'chat_form' do %> | |
<%= text_field_tag ‘message’, id: ‘chat_msg’%> | |
<%= submit_tag ‘send’%> | |
<% end %> | |
<script src='//static.opentok.com/v2/js/opentok.min.js'></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var apiKey = <%= OPENTOK_API_KEY %> | |
// use same session_id and token that we have generated above. |
class ChatsController < ApplicationController | |
def chat | |
opentok = OpenTok::OpenTok.new OPENTOK_API_KEY, OPENTOK_SECRET_KEY | |
@session = opentok.create_session | |
@session_id = @session.session_id | |
# generate opentok token | |
@token = session.generate_token | |
end | |
end |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
tell application "SystemUIServer" | |
set actionSelected to the button returned of (display dialog "What you want to do?" buttons {"Send file", "Receive file"} default button 2) | |
if actionSelected = "Send file" then | |
set filepath to POSIX path of (choose file) | |
display dialog "Please enter IP address of receiver:" default answer "" | |
set ipAddress to text returned of result | |
if ipAddress = "" then | |
repeat | |
display dialog "IP address cant be blank,Please enter IP address of receiver:" default answer "" |
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |
Deploying a Rails 3 App with EC2 + S3 + Ubuntu + Capistrano + Passenger | |
======================================================================= | |
EC2 Setup | |
--------- | |
1 Launch New ec2 instance - ami-1634de7f | |
2 Create elastic IP [ELASTIC_IP] and associate it with instance | |
3 go to domain registrar DNS settings, @ and www to ELASTIC_IP | |
4 set the `:host` in `config/deploy.rb` to ELASTIC_IP |