Skip to content

Instantly share code, notes, and snippets.

View dropkickfish's full-sized avatar

Andy Thackray dropkickfish

View GitHub Profile
@benuski
benuski / compose.yml
Created January 31, 2024 15:50
changedetection.io and browserless v2 docker compose
version: '3.2'
services:
changedetection:
image: ghcr.io/dgtlmoon/changedetection.io:latest
container_name: changedetection
hostname: changedetection
volumes:
- changedetection-data:/datastore
environment:
@timtadh
timtadh / queue.sh
Last active March 12, 2023 07:44
BASH Job Queue. This is a example of how to make a job queue in GNU Bash. It may not work for other shells as it relies on the bash built in `read`. You will need to see the man pages for your shell to determine if this will work for you.
#!/usr/bin/env bash
rep() {
i=$1
data=$2
## run the replicate ....
}
# make the files
START=$(mktemp -t start-XXXX) ## signals the workers are starting
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active July 23, 2024 15:22
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@bkenny
bkenny / base64_encode.rb
Created August 21, 2013 12:58
Quickly encode a file in ruby to base64
require 'base64'
# Open the file you wish to encode
data = File.open('/Users/bkenny/Desktop/d3cce16ee41411e296c022000a1f980f_101.mp4').read
# Encode the puppy
encoded = Base64.encode64(data)
# Spit it out into one continous string
puts encoded.gsub(/\n/,"")