Skip to content

Instantly share code, notes, and snippets.

@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
@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 / simple-exec-with-docker-remote-api.sh
Created May 31, 2021 08:35 — forked from a0xnirudh/simple-exec-with-docker-remote-api.sh
Using the exec command with the docker API, and capturing output
#! /usr/bin/env bash
# Create the container with a long running process. If PID1 exists before
# we send the exec commands, they will fail because the container is not running
#
CONTAINER_NAME="TEST-`uuidgen`"
curl --silent --unix-socket /var/run/docker.sock "http:/containers/create?name=${CONTAINER_NAME}" -XPOST \
-H "Content-Type: application/json" \
-d '{
"Image": "ruby:latest",
@svirmi
svirmi / shrink_embeddings.ipynb
Created February 2, 2021 18:03 — forked from generall/shrink_embeddings.ipynb
Shrinking Fasttext embeddings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@svirmi
svirmi / react_on_docker2.md
Created November 19, 2020 13:47 — forked from przbadu/react_on_docker2.md
Docker configuration to run react app

Setup docker to run React app

After setting up docker to generate React app without installing node js in https://gist.github.com/przbadu/4a62a5fc5f117cda1ed5dc5409bd4ac1 It was confusing to some of the devs, how to run react app, so I am creating this as second step to the configuration.

Generate required files in your react project

cd my-react-app
touch Dockerfile Dockerfile.dev docker-compose.yml .dockerignore
@svirmi
svirmi / Count lines in Git repo
Created November 11, 2020 06:35 — forked from mandiwise/Count lines in Git repo
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@svirmi
svirmi / vue2_manual_drag_and_drop.js
Created June 16, 2020 12:51 — forked from Mo3g4u/vue2_manual_drag_and_drop.js
vue.js 2.0 manual drag drop sample
<h1>User List (sort)</h1>
<p><a href="{{ basePath }}/top">Top</a></p>
<p><a href="{{ basePath }}/user/add">Add</a></p>
<div id="userList">
<table border="1">
<thead>
<tr>
<th>■</th>
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from webdriver_manager.chrome import ChromeDriverManager
class Autotrader:
def __init__(self, url):
self.url = url
self.driver = None
self.page_num = None
self.xpath_dict = self.XPathDict()