This file contains hidden or 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
| def YOUR VIDEO MODEL | |
| STUFF | |
| def zencode! | |
| # only zencode if it's not waiting to be uploaded | |
| if self.video.queued_for_write.empty? | |
| result = YOUR ZENCODER JOB | |
| if result['errors'] | |
| self.zencoder_status = "Error: #{result['errors']}" |
This file contains hidden or 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
| ffmpeg -i fifty-fifty_short.mp4 -b 5000k -acodec wmav2 -vcodec wmv2 -ar 44100 -ab 56000 -ac 2 -y fifty-fifty_short.wmv |
This file contains hidden or 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
| // When animation starts | |
| ExternalInterface.call('js_get_flash_val', [animationName], 'start'); | |
| // When animation finishes | |
| ExternalInterface.call('js_get_flash_val', [animationName], 'finish'); |
This file contains hidden or 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
| // NOTE: We have to replace the 'releases/xxxx' folder with 'current' | |
| define('FCPATH', preg_replace('/releases\/\d*\//', 'current/', __FILE__)); |
This file contains hidden or 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
| namespace :deploy do | |
| task :start do | |
| restart_monit | |
| sudo "monit -g #{application} start all" | |
| START WEB SERVER (mongrels, thins, litespeed, whatever) | |
| end | |
| task :stop do | |
| restart_monit |
This file contains hidden or 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
| ############################################################################### | |
| ## Monit control file | |
| ############################################################################### | |
| ## | |
| ## Comments begin with a '#' and extend through the end of the line. Keywords | |
| ## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
| ## | |
| ## Below you will find examples of some frequently used statements. For | |
| ## information about the control file, a complete list of statements and | |
| ## options please have a look in the monit manual. |
This file contains hidden or 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
| #!/bin/sh -e | |
| # workling This init.d script is used to start workling. | |
| # It basically just calls workling. | |
| . /lib/lsb/init-functions | |
| ROOT="YOUR_WEB_APP" | |
| PID=$ROOT"log/workling$2.pid" | |
| WORKLING=$ROOT"script/workling_client" | |
| START_COMMAND=$WORKLING" start" |
This file contains hidden or 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
| #!/bin/sh -e | |
| # starling This init.d script is used to start starling. | |
| # It basically just calls starling. | |
| ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin" | |
| set -e | |
| if [ -x /usr/bin/starling ] ; then | |
| HAVE_STARLING=1 | |
| else |
This file contains hidden or 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
| #!/bin/sh -e | |
| ### BEGIN INIT INFO | |
| # Provides: workling | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Start/stop worklings | |
| ### END INIT INFO | |
| # |
This file contains hidden or 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
| #!/bin/sh -e | |
| ### BEGIN INIT INFO | |
| # Provides: starling | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Start/stop starling server | |
| ### END INIT INFO | |
| # |