Skip to content

Instantly share code, notes, and snippets.

@svirmi
svirmi / gist:dca1f1abee9e18457340e3b71d2a6315
Created July 30, 2021 19:45 — forked from aodin/gist:9493190
Parsing JSON in a request body with Go
package main
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
)
type Message struct {
@svirmi
svirmi / stream_to_youtube.sh
Created August 1, 2021 17:27 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
ffmpeg -re -i ./video.mp4 \
-acodec libvo_aacenc -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 1280x720 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace \
-vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "rtmp://live-api-s.facebook.com:80/rtmp/THE-SECRET-KEY"
@svirmi
svirmi / cut.sh
Created August 18, 2021 10:08
ffmpeg cut from time till the end
ffmpeg -ss 00:01:16 -i 20210815_165053.mp4 -c copy out.mp4
@svirmi
svirmi / README.md
Created September 7, 2021 17:40 — forked from mikoim/README.md
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

@svirmi
svirmi / package.json
Created December 9, 2021 08:04 — forked from jthrilly/package.json
Record gsap animations frame by frame with puppeteer
{
"name": "gsap-to-video",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"fs-extra": "^7.0.0",
"puppeteer": "^1.7.0"
}
}
@svirmi
svirmi / CorsListener.php
Created January 4, 2022 12:58 — forked from robinvdvleuten/CorsListener.php
CORS Listener and Handling with Symfony2
<?php
namespace AppBundle\EventListener;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
@svirmi
svirmi / install.sh
Last active March 31, 2022 06:40
pivpn install script (slightly modified to potentially fix this issue https://github.com/pivpn/pivpn/issues/994)
#!/usr/bin/env bash
# PiVPN: Trivial OpenVPN or WireGuard setup and configuration
# Easiest setup and mangement of OpenVPN or WireGuard on Raspberry Pi
# https://pivpn.io
# Heavily adapted from the pi-hole.net project and...
# https://github.com/StarshipEngineer/OpenVPN-Setup/
#
# Install with this command (from your Pi):
#
# curl -L https://install.pivpn.io | bash
@svirmi
svirmi / check.sh
Created August 26, 2022 04:57
Issue with imagecreatefromjpeg function
# https://stackoverflow.com/questions/51421952/call-to-undefined-function-intervention-image-gd-imagecreatefromjpeg-lara
docker exec -it webadmin_php_1 php -r 'print_r(gd_info());'
@svirmi
svirmi / tinder-api-documentation.md
Created October 17, 2022 05:08 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)