Skip to content

Instantly share code, notes, and snippets.

@adamantnz
adamantnz / vwdependencies.sql
Last active February 26, 2024 02:45
Redshift - view table/schema dependencies
CREATE OR REPLACE VIEW dbo.vwdependencies
AS
SELECT DISTINCT c_p.oid AS tbloid
,n_p.nspname AS schemaname
,c_p.relname AS NAME
,n_c.nspname AS refbyschemaname
,c_c.relname AS refbyname
,c_c.oid AS viewoid
FROM pg_class c_p
JOIN pg_depend d_p ON c_p.relfilenode = d_p.refobjid
@cyppan
cyppan / iab.clj
Created August 4, 2015 06:16
If you use AlchemyAPI and want to map its categories to IAB ones you may find this get-iabs function useful
(ns alchemyapi.iab)
(def iab-categories
{"IAB1" "Arts_Entertainment"
"IAB1-1" "Arts_Entertainment/Books & Literature"
"IAB1-2" "Arts_Entertainment/Celebrity Fan/Gossip"
"IAB1-3" "Arts_Entertainment/Fine Art"
"IAB1-4" "Arts_Entertainment/Humor"
"IAB1-5" "Arts_Entertainment/Movies"
"IAB1-6" "Arts_Entertainment/Music"

Git Cheat Sheet

Commands

Getting Started

git init

or