Skip to content

Instantly share code, notes, and snippets.

View dangayle's full-sized avatar

Dan Gayle dangayle

View GitHub Profile
@dangayle
dangayle / interview.md
Created January 14, 2026 21:58 — forked from robzolkos/interview.md
Claude Code Interview command by Thariq
description argument-hint model
Interview me about the plan
plan
opus

Read this plan file $1 and interview me in detail using the AskUserQuestionTool about literally anything: technical implementation, UI & UX, concerns, tradeoffs, etc. but make sure the questions are not obvious.

@dangayle
dangayle / install_packages.sh
Created December 25, 2025 01:47
macOS bulk installer for audio plugins, etc.
#!/bin/bash
# Global variables for cleanup
MOUNT_POINTS=()
TEMP_DIRS=()
INSTALLED=()
FAILED=()
# Verbose flag (default is quiet). Use `--verbose` or `-v` to enable.
VERBOSE=0
@dangayle
dangayle / conventional-commits-cheatsheet.md
Created December 18, 2025 18:57 — forked from qoomon/conventional-commits-cheatsheet.md
Conventional Commits Cheatsheet
from app import db
from sqlalchemy import func, types
from sqlalchemy.dialects import postgresql
class JSONCache(db.Model):
id = db.Column(db.Integer, primary_key=True)
key = db.Column(db.String, nullable=False, index=True)
data = db.Column(postgresql.JSONB, nullable=False)
timestamp = db.Column(types.TIMESTAMP, server_default=func.now(), nullable=False)
@dangayle
dangayle / README.md
Created April 24, 2019 21:00 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@dangayle
dangayle / ffmpeg.sh
Created March 2, 2019 00:51 — forked from crookm/ffmpeg.sh
FFmpeg commands to create DASH and HLS
mkdir dash && \
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=426:240 -b:v 400k -r 30 -dash 1 dash/426x240-30-400k.webm && \
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=426:240 -b:v 600k -r 30 -dash 1 dash/426x240-30-600k.webm && \
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=640:360 -b:v 700k -r 30 -dash 1 dash/640x360-30-700k.webm && \
ffmpeg -hide_banner -i original.mkv -c:v libvpx-vp9 -row-mt 1 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 \
-movflags faststart -f webm -dash 1 -speed 3 -threads 4 -an -vf scale=640:360 -b:v 900k -r 30 -dash 1 dash/640x360-30-900k.we
@dangayle
dangayle / isElementInViewport.js
Created January 4, 2019 03:54 — forked from davidtheclark/isElementInViewport.js
JavaScript: Is element in viewport?
/*
No jQuery necessary.
Thanks to Dan's StackOverflow answer for this:
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
*/
function isElementInViewport(el) {
var rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
@dangayle
dangayle / classify_startstop.py
Created May 24, 2017 23:56 — forked from shivkanthb/classify_startstop.py
Subscribe and unsubscribe to messages
from textblob.classifiers import NaiveBayesClassifier
from textblob import TextBlob
train = [
('Take me off', 'stop'),
('Stop texting','stop'),
('stop messaging','stop'),
('Don\'t talk', 'stop'),
('Stop messaging','stop'),
('dont want to talk anymore','stop'),
@dangayle
dangayle / contact.html
Created May 10, 2017 18:42 — forked from tgroshon/contact.html
Formatted snippet authored by Jeff Richards (http://www.jrichards.ca/)
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
function submitToAPI() {
var URL = ‘/contact’;
var data = {
name: $(‘#name-input’).val(),
email: $(‘#email-input’).val(),
description: $(‘#description-input’).val()
@dangayle
dangayle / app.js
Created January 2, 2017 22:28
Loading Tachyons using Webpack and React
import React from 'react';
import Tachyons from 'tachyons/css/tachyons.min.css'
const App = () => (
<div className="mw9 center">
<h2 className="red sans-serif tc">Hello, world</h2>
</div>
);
export default App;