(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| class Admin::Api::BaseController < Admin::BaseController | |
| after_filter :set_csrf_cookie | |
| # For client side js applications needing to qualify for Rails CSRF protection | |
| # Normally rails will return its csrf token in the body of the request for html rendering | |
| # | |
| # In the case of client side apps, we return the token in a cookie | |
| # See: https://technpol.wordpress.com/2014/04/17/rails4-angularjs-csrf-and-devise/ | |
| def set_csrf_cookie | |
| cookies['X-CSRF-TOKEN'] = form_authenticity_token if protect_against_forgery? |
| #!/bin/bash | |
| # Fail if any commands fail | |
| set -e | |
| set -o pipefail | |
| # These are ec2 tags from which we will determine where to deploy | |
| ec2_stage=$DEPLOY_STAGE | |
| ec2_app="core" | |
| ec2_role="app" |
TinyMCE is a javascript WYSIWYG editor that is highly configurable and has a ton of features and plugins. It integrates with jQuery and, with a bit of work, it can be integrated in your ember-cli app.
Step 1: Install TinyMCE:
bower install --save tinymce
Step 2: Import the required files into your app via broccoli. In order to do that you will need a plugin called broccoli-static-compiler:
| # a simple/configurable rake task that generates some random fake data for the app (using faker) at various sizes | |
| # NOTE: requires the faker or ffaker gem | |
| # sudo gem install faker - http://faker.rubyforge.org | |
| # OR | |
| # sudo gem install ffaker - http://github.com/EmmanuelOga/ffaker | |
| require 'faker' | |
| class Fakeout |
| # config/application.rb | |
| module MyApp | |
| class Application < Rails::Application | |
| config.autoload_paths << config.root.join('lib') | |
| end | |
| end |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>jQuery UI Sortable - Default functionality</title> | |
| <divnk rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css"> | |
| <style> | |
| body { | |
| font-family: Arial, Helvetica, sans-serif; |