###SMART FILE BACKUPS###
cp PATH_TO_FILE PATH_TO_FILE.$(date "+%b_%d_%Y_%H.%M.%S")
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.$(date "+%Y%m%d%H%M%S")
| #### transcoder.rb #### | |
| class Transcoder < Message | |
| STATUS_SUBMITTED = "Submitted" | |
| STATUS_PROGRESSING = "Progressing" | |
| STATUS_COMPLETE = "Complete" | |
| STATUS_CANCELED = "Canceled" | |
| STATUS_ERROR = "Error" | |
| def initialize(message) |
| Notes on how to use AWS SNS: | |
| 1. Subscribe an HTTP endpoint (i.e. http://myhost/sns_endpoint) on AWS Console | |
| 2. AWS will send subscription confirmation right away | |
| 3. SNS_controller responds to subscription confirmation by sending confirmation using Fog. | |
| 4. Once AWS is happy, you can start sending notifications to your end point via SNS. |
| Problem | |
| To delete all the lines of a file that is open in Vim. | |
| Solution | |
| Type `gg` to move the cursor to the first line of the file, if it is not already there. | |
| Type `dG` to delete all the lines. |
| # Gemfile | |
| gem 'jquery-ui-rails' | |
| $ bundle update jquery-ui-rails | |
| Installing jquery-ui-rails 5.0.2 (was 4.2.1) | |
| # application.js | |
| //= require jquery | |
| //= require jquery-ui | |
| //= require jquery_ujs |
| require 'aws' | |
| AWS.config(:access_key_id => 'XXXXX', :secret_access_key => 'XXXXX') | |
| pipeline_id = 'XXXXXXX' | |
| preset_id = 'XXXXXX' | |
| s3 = AWS::S3.new | |
| bin = s3.buckets['XXXXXX-in'] | |
| bout = s3.buckets['XXXXXX-out'] |
| $baseFontSize: 12px; | |
| $navbarCollapseWidth: 979px; | |
| $navbarHeight: 40px; | |
| $navbarBackgroundHighlight: #49AFCD; /* 49AFCD 1EA7C4 2185C5*/ | |
| $navbarBackground: darken($navbarBackgroundHighlight, 5%); | |
| $navbarBorder: darken($navbarBackground, 12%); |
| # An example of elasticsearch & Tire setup for ActiveRecord associations. | |
| # | |
| # A `Book has_many :chapters` scenario, with mapping and JSON serialization | |
| # for indexing associated models. | |
| # | |
| # Demonstrates three important caveats as of now: | |
| # | |
| # 1. You you have to use `touch: true` in the `belongs_to` declaration, | |
| # to automatically notify the parent model about the update. | |
| # |
###SMART FILE BACKUPS###
cp PATH_TO_FILE PATH_TO_FILE.$(date "+%b_%d_%Y_%H.%M.%S")
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.$(date "+%Y%m%d%H%M%S")
https://gorails.com/deploy/ubuntu/14.04
##Install Nginx, PHP-FPM, MySQL and phpMyAdmin on OS X Mavericks using Homebrew ###
http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/
| user www-data; | |
| pid /run/nginx.pid; | |
| worker_processes auto; # was set to 8 | |
| worker_rlimit_nofile 100000; | |
| events { | |
| worker_connections 1024; | |
| multi_accept on; | |
| } | |
| http { |