- Go to: 'System Preferences' >> 'MySQL' and stop MySQL
OR,
- sudo /usr/local/mysql/support-files/mysql.server start
- sudo /usr/local/mysql/support-files/mysql.server stop
| source 'https://rubygems.org' | |
| gem "graphql", github: "rmosolgo/graphql-ruby", branch: "subscriptions" | |
| gem "sinatra" | |
| gem "thin" |
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
| # Stop all containers | |
| docker stop `docker ps -qa` | |
| # Remove all containers | |
| docker rm `docker ps -qa` | |
| # Remove all images | |
| docker rmi -f `docker images -qa ` | |
| # Remove all volumes |
| syntax on | |
| set ruler " Show the line and column numbers of the cursor. | |
| set formatoptions+=o " Continue comment marker in new lines. | |
| set textwidth=0 " Hard-wrap long lines as you type them. | |
| set modeline " Enable modeline. | |
| set esckeys " Cursor keys in insert mode. | |
| set linespace=0 " Set line-spacing to minimum. | |
| set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
| " More natural splits | |
| set splitbelow " Horizontal split below current. |
| FROM rails:4.2.3 | |
| MAINTAINER Renato Filho <[email protected]> | |
| ENV HOME /home/app | |
| ENV RAILS_ENV development | |
| RUN useradd -m -s /bin/bash app | |
| RUN gem install -N bundler |
Note that for blocks, {} and do ... end are interchangeable. For brevity, only the former will be listed here.
Pre-1.9, lambda and proc are synonyms. Essentially the difference is between proc and block.
def method(&block) p block.class; p block.inspect; end
l = lambda { 5 }
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.