Skip to content

Instantly share code, notes, and snippets.

View nrempel's full-sized avatar
🥤

Nick Rempel nrempel

🥤
View GitHub Profile
@nrempel
nrempel / gist-tutorial-13f-holdings.md
Created December 15, 2025 01:08
Monitor hedge fund 13F holdings with the Earnings Feed API - Python & JavaScript examples

Track Hedge Fund Holdings with the Earnings Feed API

A practical guide to monitoring institutional investor portfolios using SEC 13F data.

What You'll Learn

  • How to access 13F institutional holdings data
  • Track specific fund managers (Berkshire Hathaway, Bridgewater, etc.)
  • Find all institutional holders of a stock
  • Detect position changes between quarters
@nrempel
nrempel / gist-tutorial-insider-trading.md
Created December 15, 2025 01:08
Track insider trading with the Earnings Feed SEC API - Python & JavaScript examples

How to Track Insider Trading with the Earnings Feed API

A practical guide to building insider trading alerts using SEC Form 4 data.

What You'll Learn

  • How to fetch insider transactions from the SEC
  • Filter for significant purchases vs. routine sales
  • Build a simple alerting system
  • Understand what the data actually means

Keybase proof

I hereby claim:

  • I am nrempel on github.
  • I am nbrempel (https://keybase.io/nbrempel) on keybase.
  • I have a public key ASAftFlDSiw5r-dyaLSzRVeB4-gNEgjo5w2Rqd2P5KbHPgo

To claim this, I am signing this object:

const amqp = require('amqplib/callback_api');
amqp.connect(process.env.RABBIT_URL, (err, conn) => {
conn.createChannel((err, ch) => {
// Consume messages from web queue
var q1 = 'web';
ch.assertQueue(q1, { durable: false });
ch.consume(q1, (msg) => {
console.info('Message received from web process:', msg.content.toString());
}, {noAck: true});
const express = require('express');
const pg = require('pg');
const redis = require('redis');
const amqp = require('amqplib/callback_api');
const app = express();
app.get('/', (req, res) => {
res.send('Hello World!')
});
#!/bin/bash
set -e
SCRIPT_HOME="$( cd "$( dirname "$0" )" && pwd )"
cd $SCRIPT_HOME
case "$1" in
start)
docker-compose up web worker clock
# Inherit from node base image
FROM node
# This is an alternative to mounting our source code as a volume.
# ADD . /app
# Install Yarn repository
RUN curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
version: '3'
services:
###############################
# Built from local Dockerfile #
###############################
web:
# Build the Dockerfile in this directory.
build: .
# Mount this directory as a volume at /app
volumes:
const SimpleCron = require('simple-cron');
const cron = new SimpleCron();
const amqp = require('amqplib/callback_api');
cron.schedule('* * * * *', () => {
amqp.connect(process.env.RABBIT_URL, (err, conn) => {
conn.createChannel((err, ch) => {
const q = 'clock';
ch.assertQueue(q, { durable: false });
ch.sendToQueue(q, Buffer.from('hi.'));
@nrempel
nrempel / postgres_queries_and_commands.sql
Created August 31, 2016 04:10 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'