Skip to content

Instantly share code, notes, and snippets.

View douxsey's full-sized avatar

Douxsey douxsey

View GitHub Profile
@frankfaustino
frankfaustino / composing.software.md
Last active March 3, 2023 06:20
Eric Elliot: Composing Software Series

Eric Elliott: Composing Software

@elct9620
elct9620 / node.rb
Created October 22, 2017 14:54
Rails using PostgreSQL Recursive Query to find ancestors
# CREATE TABLE nodes (
# id bigserial primary key,
# parent_id bigint null
# )
class Node < ApplicationRecord
def ancestors(depth: 10)
query = <<- SQL
WITH RECURSIVE node_paths(#{Node.column_names.join(', ')}, depth) AS (
@bertrandmartel
bertrandmartel / aggregation_lookup.md
Last active December 22, 2023 13:32
MongoDB $lookup aggregation example

MongoDB $lookup aggregation

SO link

db.votes.aggregate([{
    $lookup: {
        from: "users",
        localField: "createdBy",
        foreignField: "_id",
@staltz
staltz / introrx.md
Last active May 12, 2025 23:22
The introduction to Reactive Programming you've been missing