Skip to content

Instantly share code, notes, and snippets.

View davidqhr's full-sized avatar
🎯
Focusing

david davidqhr

🎯
Focusing
  • 19:16 (UTC -07:00)
View GitHub Profile
@davidqhr
davidqhr / 0_reuse_code.js
Created December 28, 2016 04:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@davidqhr
davidqhr / read-access.sql
Created April 17, 2018 14:03 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;