Skip to content

Instantly share code, notes, and snippets.

View costa's full-sized avatar

Costa Shapiro costa

View GitHub Profile
@costa
costa / integ_specs.rb
Last active March 11, 2024 13:05
The principal excerpts of the "Lively Video Reporting" system core comps' integ specs
describe "Automated publishing" do # NOTE incl. drv/youtube integration
# ...setup...
it "should happen whenever .pub.video is comitted to 'log' git repo" do
Dir.chdir log_repo_work_dir do
sample_pub_video_path = File.join(today_date_path, 'just-testing.pub.video')
sample_pub_video_text = # NOTE straight outta ../README.md
<<EOF
Chang Wash Fun, winter 2022, Chiang Mai, Thailand
src:
# NOTE re: deployment
# - with self server (running on any VM from any provider):
# $ @@ dev docker-compose up --remove-orphans
# and then:
# $ @@ ^dev # will securely tunnel WUI (:3000) to http://localhost:16623
# - with docker-compose configured otherwise:
# # well, you must know how to run this in your environment then, see below
version: '2.1'
services:
chat:
@costa
costa / html2haml.sh
Created September 11, 2023 11:55
HTML -> HAML one-liner
docker run --rm -v "`pwd`:`pwd`" -w "`pwd`" ruby bash -c 'gem install html2haml; find . -name "*.erb" | while read path; do html2haml "$path" "${path%erb}haml"; rm "$path"; done'
|o|
video_output_options = {resolution: Ffmprb::HD_4K, fps: 60, encoder: 'huffyuv'}
class InputSlideCropper
def initialize(inp, cols = 1, rows = 1)
fail "not much of a slideshow" unless
rows > 0 && cols > 0 && rows + cols > 2
@inp = inp
@h1 = 1.0/(@rows = rows)
@w1 = 1.0/(@cols = cols)
|o|
# NOTE Run me like this: | <ffmprb> <OUT-PATH>
# NOTE A bit of a boilerplate for more independence:
# NOTE for previewing
# video_output_options = {resolution: Ffmprb::HD_720p, fps: 30, encoder: 'libx264'}
# NOTE for further processing:
video_output_options = {resolution: Ffmprb::HD_4K, fps: 60, encoder: 'huffyuv'}
# NOTE for viewing
|o|
# NOTE Run me like this: | <ffmprb> <OUT-PATH>
# NOTE for previewing
# video_output_options = {resolution: Ffmprb::HD_720p, fps: 30, encoder: 'libx264'}
# NOTE for further processing:
video_output_options = {resolution: Ffmprb::HD_4K, fps: 60, encoder: 'huffyuv'}
# NOTE for viewing
# video_output_options = {resolution: Ffmprb::HD_1080p, fps: 60, encoder: 'libx265'}
# NOTE for dev
|o|
# NOTE Run me like this: | <ffmprb> <OUT-PATH>
# NOTE A bit of a boilerplate for more independence:
# NOTE for previewing
# video_output_options = {resolution: Ffmprb::HD_720p, fps: 30, encoder: 'libx264'}
# NOTE for further processing:
video_output_options = {resolution: Ffmprb::HD_4K, fps: 60, encoder: 'huffyuv'}
# NOTE for viewing
@costa
costa / stackshare-2y-old-listing-review.pub-1.ffmp.rb
Created May 24, 2023 09:39
A FFmpRb script for the DEMO of the solo screen-based-presentation format
|o|
# NOTE Run me like this: | <ffmprb> <OUT-PATH>
# NOTE A bit of a boilerplate for more independence:
video_output_options = {resolution: Ffmprb::HD_4K, fps: 30, encoder: 'libx264'}
Ffmprb::Process.input_video_auto_rotate = true # NOTE surprisingly, for the sake of oiPad media...'
class FfmprbUnzipper
def initialize
@tmp_files = []
@costa
costa / stackshare-2y-old-listing-review.pub-2.ffmp.rb
Last active May 24, 2023 09:39
A FFmpRb script for the DEMO of the solo screen-based-presentation format
|o|
# NOTE Run me like this: | <ffmprb> <OUT-PATH>
# NOTE A bit of a boilerplate for more independence:
# NOTE for further processing:
video_output_options = {resolution: Ffmprb::HD_4K, fps: 60, encoder: 'huffyuv'}
Ffmprb::Process.input_video_auto_rotate = true # NOTE surprisingly, for the sake of oiPad media...'
@costa
costa / docker-compose.yml
Created March 22, 2023 04:38
simple torrenting "comp" with a web interface
version: '2.1'
services: # NOTE basic, no VPN, setup
torrenting:
image: linuxserver/transmission
environment:
- PORT=9091 # NOTE needed by the (self server) platform
- PEERPORT=31415 # NOTE a random port for torrent proto
- PGID=0 # NOTE the (self server) platform has...
- PUID=0 # ...limited use for permissions
- TZ=Etc/UTC