Skip to content

Instantly share code, notes, and snippets.

🐢
I may be slow to respond.

MICE Portal stereosupersonic

🐢
I may be slow to respond.
Block or report user

Report or block stereosupersonic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
View Capybara.md

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
View gist:5b3ff53c3784b18796c873d358fb3a44

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@stereosupersonic
stereosupersonic / README-Template.md
Created Nov 3, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View Capybara Cheat Sheet.md

Capybara Cheat Sheet

Navigating

visit('/projects')
visit(post_comments_path(post))

Clicking Links and Buttons

You can’t perform that action at this time.