Oct 16 2010
- 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments
In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].
| # SSH Agent Functions | |
| # Mark Embling (http://www.markembling.info/) | |
| # | |
| # How to use: | |
| # - Place this file into %USERPROFILE%\Documents\WindowsPowershell (or location of choice) | |
| # - Import into your profile.ps1: | |
| # e.g. ". (Resolve-Path ~/Documents/WindowsPowershell/ssh-agent-utils.ps1)" [without quotes] | |
| # - Enjoy | |
| # | |
| # Note: ensure you have ssh and ssh-agent available on your path, from Git's Unix tools or Cygwin. |
| require "rubygems" | |
| require "ffi" | |
| module WinProcess | |
| extend FFI::Library | |
| ffi_lib "kernel32" | |
| ffi_convention :stdcall | |
| class Error < StandardError |
| (require 'iimage) | |
| (autoload 'iimage-mode "iimage" "Support Inline image minor mode." t) | |
| (autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t) | |
| (add-to-list 'iimage-mode-image-regex-alist '("@startuml\s+\\(.+\\)" . 1)) | |
| ;; Rendering plantuml | |
| (defun plantuml-render-buffer () | |
| (interactive) | |
| (message "PLANTUML Start rendering") | |
| (shell-command (concat "java -jar ~/Downloads/plantuml.jar " |
| ;;; js-beautify.el -- beautify some js code | |
| (defgroup js-beautify nil | |
| "Use jsbeautify to beautify some js" | |
| :group 'editing) | |
| (defcustom js-beautify-args "--jslint-happy --brace-style=end-expand --keep-array-indentation" | |
| "Arguments to pass to jsbeautify script" | |
| :type '(string) | |
| :group 'js-beautify) |
| !!! 5 | |
| html(class='no-js') | |
| head | |
| meta(charset='utf-8') | |
| meta(http-equiv='X-UA-Compatible', content='IE=edge') | |
| title | |
| meta(name='description', content='') | |
| meta(name='viewport', content='width=device-width, initial-scale=1') |
| gem 'pg' | |
| group :development do | |
| gem 'ruby-debug' | |
| end | |
| gem 'rake', '~> 0.8.7' | |
| gem 'devise' | |
| gem 'oa-oauth', :require => 'omniauth/oauth' | |
| gem 'omniauth' | |
| gem 'haml' | |
| gem 'dynamic_form' |
| #======================================= | |
| # Part 1 is Setting up the Mirror Server | |
| # Install CPAN::Mini | |
| $ curl -L http://cpanmin.us | perl - --sudo CPAN::Mini | |
| # Select a CPAN Mirror URL from http://mirrors.cpan.org/ | |
| # - We'll use http://cpan.pair.com | |
| # Pick a directory to mirror to, I'll use /var/www/cpan |
| bootstrap-tooltip.js | |
| bootstrap-popover.js | |
| bootstrap-alert.js | |
| bootstrap-button.js | |
| bootstrap-carousel.js | |
| bootstrap-collapse.js | |
| bootstrap-dropdown.js | |
| bootstrap-modal.js | |
| bootstrap-scrollspy.js | |
| bootstrap-tab.js |
| # config/initializers/active_admin_mongoid_patch.rb | |
| require "active_admin" | |
| require "active_admin/resource_controller" | |
| require 'ostruct' | |
| module ActiveAdmin | |
| class Namespace | |
| # Disable comments | |
| def comments? |