And I can't remember the options to save my life - and that man page, just goes on and on...
My cheat sheet is 99% of the important ones:
I'll add explainers and examples in a follow up.
# Credit: http://richardconroy.blogspot.com/2010/08/capybara-reference.html | |
#Navigating | |
visit('/projects') | |
visit(post_comments_path(post)) | |
#Clicking links and buttons | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') |
class DevelopmentProfiler | |
def self.prof(file_name) | |
RubyProf.start | |
yield | |
results = RubyProf.stop | |
# Print a flat profile to text | |
File.open "#{Rails.root}/tmp/performance/#{file_name}-graph.html", 'w' do |file| |
require 'aws/s3' # gem name is 'aws-sdk' | |
class BucketSyncService | |
attr_reader :from_bucket, :to_bucket, :logger | |
attr_accessor :debug | |
DEFAULT_ACL = :public_read | |
# from_credentials and to_credentials are both hashes with these keys: | |
# * :aws_access_key_id |
################ | |
# Tasks | |
################ | |
# 1. A linked list is just a collection of linked nodes. | |
# Each node is linked to another node, which we call "next" in a singly linked list. | |
# In a doubly linked list, each node is linked to a "previous" and "next" node. | |
# These are the constraints that define our collection of nodes as a linked list. | |
# Extra! : http://softwarecake.com/post/29053008425/what-is-a-linked-list :) best description ever. |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
#!/bin/bash | |
# Clone of Capture Screen Region on Mac OSX (map to similar Cmd-Ctrl-Shift-4) | |
# *** Requirements *** | |
# shutter - `apt-get install shutter` | |
# copyq - download from https://github.com/hluk/CopyQ/releases | |
shutter --select --no_session --exit_after_capture --output=/tmp/screenshot-surrent.png | |
copyq write image/png - < /tmp/screenshot-surrent.png && copyq select 0 | |
rm /tmp/screenshot-surrent.png |
Hello <%= @user.name %>, | |
<%= @custom_catalog.author.name %> has shared a catalog, <%= @custom_catalog.name %>, with you. | |
You can access this catalog from the dashboard under the "Custom Catalogs" section. | |
The catalog will be identified with a link icon to indicate its a shared catalog. | |
The shared catalog is read only. If you modify it, a new copy will be created for you | |
that is not linked to the shared catalog. | |
One of your assigned dealers, <%= @document.customer_name %> (<%= @document.author.name %>) has submitted a |
Quay is your next hip cloud thingy that's going to change the world. Here, we're going to use it as a Docker registry without giving it full write access to our GitHub account, because we're having cold feet.
You see, when you try to create a new Docker repository in Quay, it helpfully suggests pointing it to a GitHub repo, so it can do all Docker building stuff for you. But in order to let it do that, it wants to have full read and write access to all your repos, both private and public. Personally, I don't think