- install RVM
\curl -sSL https://get.rvm.io | bash -s stable- List all ruby versions
rvm list known- Install a version of Ruby
| '.source.ruby': | |
| 'Redirect to': | |
| 'prefix': 'redi' | |
| 'body': "redirect_to ${1:some}_path" | |
| 'flash[:key] = value': | |
| 'prefix': 'flash' | |
| 'body': 'flash[${1::success}] = ${2:"Created successfully."}$3' | |
| 'render json': | |
| 'prefix': 'renjson' |
\curl -sSL https://get.rvm.io | bash -s stablervm list known| require 'formula' | |
| class Varnish3 <Formula | |
| url 'https://varnish-cache.org/_downloads/varnish-3.0.2.tgz' | |
| homepage 'http://www.varnish-cache.org/' | |
| sha256 '973f60625e9690e0989e1bbc73c37ea53fc6291b8f7b03d617b76f8084a4a243' | |
| depends_on 'pkg-config' => :build | |
| depends_on 'pcre' => :build |
| <?xml version="1.0"?> | |
| <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" | |
| xmlns:o="urn:schemas-microsoft-com:office:office" | |
| xmlns:x="urn:schemas-microsoft-com:office:excel" | |
| xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" | |
| xmlns:html="http://www.w3.org/TR/REC-html40"> | |
| <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> | |
| <Author>Microsoft Office User</Author> | |
| <LastAuthor>Microsoft Office User</LastAuthor> | |
| <Created>2017-09-11T01:32:10Z</Created> |
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
| #Model | |
| expect(@user).to have(1).error_on(:username) # Checks whether there is an error in username | |
| expect(@user.errors[:username]).to include("can't be blank") # check for the error message | |
| #Rendering | |
| expect(response).to render_template(:index) | |
| #Redirecting | |
| expect(response).to redirect_to(movies_path) |
| //------------------------------------------------------------------------------ | |
| // geotool.js - version 1.0.0 | |
| // | |
| // Copyright (c) 2005 Craftworks Corp. All Right Reserved. | |
| // | |
| // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Lesser General Public | |
| // License as published by the Free Software Foundation; either | |
| // version 2.1 of the License, or (at your option) any later version. | |
| // |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server; | |
| root /your/root/path; | |
| index index.html; | |
| server_name you.server.com; |
| server { | |
| # ... | |
| # handle OPTIONS requests from window.fetch | |
| if ($request_method = OPTIONS ) { | |
| add_header Access-Control-Allow-Origin "*"; | |
| add_header Access-Control-Allow-Methods "GET, OPTIONS"; | |
| add_header Access-Control-Allow-Headers "Authorization,content-type"; | |
| add_header Access-Control-Allow-Credentials "true"; |