Skip to content

Instantly share code, notes, and snippets.

Growing indie hacker

Vincent Voyer vvo

Growing indie hacker
View GitHub Profile
vvo /
Created July 15, 2013 14:28
generate sprites of video snapshots
sudo aptitude install ffmpeg
sudo aptitude install imagemagick
# fps=1 > every seconds
ffmpeg -i video.mp4 -f image2 -vf fps=fps=1 out%d.png
# horizontal sprite, resized at 30%
convert -resize 30% +append out*.png sprite-1-sec.png
# references:
vvo / class.ts
Created September 2, 2021 09:32
View class.ts
import { Label, ModelType, Version } from "@customTypes/templates";
export default class Segmentation {
public b64_mask = "",
public label = Label.Uncategorized,
public main_colors = "",
public model_type = ModelType.Free,
public model_version = Version.UnknownVersion,
public no_objects = false,
View ghost-performance-nginx-config.conf
# sets the proxy cache path location, max size 2g
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g;
# transfers the `Host` header to the backend
proxy_set_header Host $host;
# uses the defined STATIC cache zone
proxy_cache STATIC;
# cache 200 10 minutes, 404 1 minute, others status codes not cached
vvo / stripe-customer-language-list.js
Created March 18, 2021 14:06
Stripe's customers language list
View stripe-customer-language-list.js
{ label: "Arabic", value: "ar-AR" },
{ label: "Danish", value: "da-DK" },
{ label: "German", value: "de-DE" },
{ label: "English", value: "en-US" },
{ label: "Spanish (Spain)", value: "es-ES" },
{ label: "Spanish (Latin America)", value: "es-419" },
{ label: "Finnish", value: "fi-FI" },
{ label: "French", value: "fr-FR" },
{ label: "Hebrew", value: "he-IL" },
vvo / test.yml
Last active August 21, 2020 11:54
Rails and PostgreSQL setup for GitHub actions (CI)
View test.yml
name: Test
on: [push]
runs-on: ubuntu-latest
# Similar to docker-compose.yml but not the same, 🤷‍♂️
View gist:22eb9b07baa45178ceedc58feb6db4dd
2020-01-09T10:25:40.0633699Z ##[section]Starting: Request a runner to run this job
2020-01-09T10:25:40.2395888Z Requesting a hosted runner in current repository's account/organization with labels: 'ubuntu-latest', require runner match: True
2020-01-09T10:25:40.2946255Z Labels matched hosted runners has been found, waiting for one of them get assigned for this job.
2020-01-09T10:25:40.3373017Z ##[section]Finishing: Request a runner to run this job
2020-01-09T10:25:47.7137594Z Current runner version: '2.163.1'
2020-01-09T10:25:47.7138909Z Prepare workflow directory
2020-01-09T10:25:47.7363087Z Prepare all required actions
2020-01-09T10:25:47.7388745Z Download action repository 'actions/checkout@v2'
2020-01-09T10:25:49.6391641Z Download action repository 'eregon/use-ruby-action@master'
2020-01-09T10:25:49.8696320Z Download action repository 'actions/cache@v1'
vvo / .profile
Last active November 7, 2017 12:58
spr command line
View .profile
#!/usr/bin/env bash
function spr() {
remoteOrigin=$(git remote get-url origin)
if [[ $1 == "--"* ]] # spr --branch
View async-workers.js
var workers = [
{name: 'worker1', fn: function(task, cb) {/* some async processing */}},
{name: 'worker2', fn: function(task, cb) {/* some async processing */ }}
var tasks = ['one']; // this will be filled with a first task and then filled with more tasks from the workers
// I want to distribute tasks to workers, each worker can process only one task at a time
// workers will add more tasks while processing
// in some situations tasks may be empty and all workers processing