Skip to content

Instantly share code, notes, and snippets.

@aks
aks / README-migration-apis.md
Created February 23, 2018 21:54
ActiveRecord Migration actions (methods)

ActiveRecord::Migration API Notes

The ActiveRecord::Migration class is used to manage Rails migration scripts. When writing these scripts, there are many class methods that can be used to make schema changes, which are described below in several sections.

Migration Methods

Create Methods Arguments Notes Rev
create_join_table table1, table2, options Creates a join table Y
create_table name, options Creates a table Y
@alanbsmith
alanbsmith / papercall-cfp-outline.md
Last active May 11, 2021 06:54
PaperCall.io CFP Outline

CFP Outline

an outline for talks to be submitted to PaperCall.io

OVERVIEW

This document is a collection of resources and helpful information for writing a good CFP. Many of the notes and tips are direct quotes from the resources listed below. They are mostly notes I took as I read. The outline itself is formatted for PaperCall.io, and the italicized notes are from their site as well.

GENERAL TIPS

@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 22, 2024 23:19
Useful PostgreSQL Queries and Commands
-- 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%'