Skip to content

Instantly share code, notes, and snippets.

View awongh's full-sized avatar
๐Ÿ•
Snacking on pizza. Coding.

Akira Wong awongh

๐Ÿ•
Snacking on pizza. Coding.
View GitHub Profile
@awongh
awongh / postgres-cheatsheet.md
Created November 16, 2020 07:08 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@awongh
awongh / gist:394d41f845f7f81f3b27a5cd36dccbd9
Last active November 3, 2020 13:27 — forked from victorsollozzo/gist:4134793
recursively find all files in a directory with given extension in node.js
import path from 'path';
import { readdirSync, statSync } from 'fs';
function recFindByExt(base,ext,files,result)
{
files = files || readdirSync(base)
result = result || []
files.forEach(
function (file) {
["โœŒ","๐Ÿ˜‚","๐Ÿ˜","๐Ÿ˜","๐Ÿ˜ฑ","๐Ÿ‘‰","๐Ÿ™Œ","๐Ÿป","๐Ÿ”ฅ","๐ŸŒˆ","โ˜€","๐ŸŽˆ","๐ŸŒน","๐Ÿ’„","๐ŸŽ€","โšฝ","๐ŸŽพ","๐Ÿ","๐Ÿ˜ก","๐Ÿ‘ฟ","๐Ÿป","๐Ÿถ","๐Ÿฌ","๐ŸŸ","๐Ÿ€","๐Ÿ‘€","๐Ÿš—","๐ŸŽ","๐Ÿ’","๐Ÿ’™","๐Ÿ‘Œ","โค","๐Ÿ˜","๐Ÿ˜‰","๐Ÿ˜“","๐Ÿ˜ณ","๐Ÿ’ช","๐Ÿ’ฉ","๐Ÿธ","๐Ÿ”‘","๐Ÿ’–","๐ŸŒŸ","๐ŸŽ‰","๐ŸŒบ","๐ŸŽถ","๐Ÿ‘ ","๐Ÿˆ","โšพ","๐Ÿ†","๐Ÿ‘ฝ","๐Ÿ’€","๐Ÿต","๐Ÿฎ","๐Ÿฉ","๐ŸŽ","๐Ÿ’ฃ","๐Ÿ‘ƒ","๐Ÿ‘‚","๐Ÿ“","๐Ÿ’˜","๐Ÿ’œ","๐Ÿ‘Š","๐Ÿ’‹","๐Ÿ˜˜","๐Ÿ˜œ","๐Ÿ˜ต","๐Ÿ™","๐Ÿ‘‹","๐Ÿšฝ","๐Ÿ’ƒ","๐Ÿ’Ž","๐Ÿš€","๐ŸŒ™","๐ŸŽ","โ›„","๐ŸŒŠ","โ›ต","๐Ÿ€","๐ŸŽฑ","๐Ÿ’ฐ","๐Ÿ‘ถ","๐Ÿ‘ธ","๐Ÿฐ","๐Ÿท","๐Ÿ","๐Ÿซ","๐Ÿ”ซ","๐Ÿ‘„","๐Ÿšฒ","๐Ÿ‰","๐Ÿ’›","๐Ÿ’š"]
@awongh
awongh / postgresql_configuration_on_ubuntu_for_rails.md
Created January 22, 2016 12:49 — forked from p1nox/postgresql_configuration_on_ubuntu_for_rails.md
PostgreSQL configuration without password on Ubuntu for Rails

Abstract

You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev