Skip to content

Instantly share code, notes, and snippets.

View patricktrainer's full-sized avatar
💭
🪠

Patrick patricktrainer

💭
🪠
View GitHub Profile
@garethbrickman
garethbrickman / example.py
Created April 9, 2025 14:30
Dagster - Example using a sensor to report materializations to an external asset and automation condition to update a regular asset
import dagster as dg
import datetime as dt
import random
my_external_asset = dg.AssetSpec(
key="my_external_asset"
)
external_asset_monitoring_condition = dg.AutomationCondition.eager()
@jasonjimnz
jasonjimnz / Dockerfile
Created February 24, 2025 20:19
Local ETL arch, for starting with a complete pipeline using AI services
# dagster/Dockerfile
FROM python:3.12-bullseye
ENV DAGSTER_HOME=/opt/dagster/dagster_home/
RUN mkdir -p $DAGSTER_HOME
WORKDIR $DAGSTER_HOME
COPY dagster $DAGSTER_HOME
@cnolanminich
cnolanminich / assets
Created November 8, 2024 17:21
querying assets and jobs
query GetAssetDetails($assetKey: AssetKeyInput!) {
assetNodeOrError(assetKey: $assetKey) {
... on AssetNode {
assetKey {
path
}
dataVersion
description
groupName
hasAssetChecks

Crippling Facebook

Facebook works with advertisers to target you. These instructions are one of the many ways to begin crippling that relationship. When AI targeting is crippled, your psychosecurity improves :)

  1. On your desktop machine, goto https://accountscenter.facebook.com/ads/audience_based_advertising
  2. Maximize the browser window
  3. Press F12 and click on the Console tab
  4. Select the code below, copy it, paste it upon the Console line (The area next to the > character in the Console window), and press enter:
@kconner
kconner / macOS Internals.md
Last active October 21, 2025 15:03
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@ustayready
ustayready / gpt.py
Created January 16, 2023 23:49
CloudGPT - Use ChatGPT to analyze AWS policies for vulnerabilities
import openai
import boto3
import json
import time
from typing import Dict, List
openai.api_key = '### SET YOUR OPENAPI API KEY HERE ###'
session = boto3.session.Session()
client = session.client('iam')
@aileftech
aileftech / hex-colors.txt
Created October 1, 2022 18:10
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
@seisvelas
seisvelas / nqueens_sql.md
Last active October 15, 2023 08:03
Solving n queens in SQL

8 queens (wiki explanation), as well as its variant n queens, was one of the first really 'hard' toy problems I did at Hola<Code /> (Hi people who look down at bootcamp alumni. I understand you. But still go fuck yourself). First I did it in Python with backtracking and a global store of solutions. Then I did it statelessly in Racket, then in Javascript, then back around to Python. here is my Node.js version (stateless):

var {range} = require('range')
        
function isThreatened(board, pos) {
  return board.includes(pos) ||
@dkittell
dkittell / SetDNS.sh
Last active September 6, 2024 11:24
#!/bin/sh
# SetDNS.sh
#
#
# Created by David Kittell on 6/14/19.
#
# Variables - Start
sExternalIPService="http://dns.kittell.net/ip.php"