Start server:
go run .Open http://localhost:3000/:
open http://localhost:3000/Start server:
go run .Open http://localhost:3000/:
open http://localhost:3000/Run CLI:
go run .Run Go program:
go run hello.go| #!/usr/bin/env bash | |
| # Creates a looping 630x500 GIF that fades from image1 to image2 and back | |
| ffmpeg \ | |
| -loop 1 -t 3 -i image1.png \ | |
| -loop 1 -t 3 -i image2.png \ | |
| -loop 1 -t 3 -i image1.png \ | |
| -filter_complex " | |
| [0:v][1:v]xfade=transition=fade:duration=1:offset=2[first]; | |
| [first][2:v]xfade=transition=fade:duration=1:offset=4, |
| const fs = require('fs'); | |
| // Generate a simple click sound (short high-pitched tone with decay) | |
| const sampleRate = 44100; | |
| const duration = 0.05; // 50ms | |
| const numSamples = Math.floor(sampleRate * duration); | |
| const frequency = 800; // Hz | |
| // Create WAV header | |
| const headerSize = 44; |