Skip to content

Instantly share code, notes, and snippets.

@adamhaney
adamhaney / dag.py
Created June 14, 2017 18:10
DBT Airflow DAG with model/graph introspection
from datetime import datetime, timedelta
import networkx as nx
from airflow import DAG
from airflow.operators import BashOperator, SubDagOperator
start_date = datetime(year=2017, month=6, day=13, hour=19, minute=0)
schedule_interval = '0 * * * 1-5'
default_args = {
@marklit
marklit / bigint_uuid.py
Last active August 22, 2017 20:10
UUIDs that fit in the AWS Redshift BIGINT field type
import hashlib
import uuid
int(hashlib.sha1(str(uuid.uuid4()).replace('-', '')).hexdigest(), 16) % 2147483647
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 18, 2026 09:53
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname