Skip to content

Instantly share code, notes, and snippets.

View acabrol's full-sized avatar

Alexandre CABROL PERALES acabrol

  • Sopra Steria
  • France
View GitHub Profile
@acabrol
acabrol / youtube_audio_2_text.py
Last active July 10, 2023 23:18
Convert youtube video's audio to text
import tempfile
from pytube import YouTube
from pytube import helpers
from pydub import AudioSegment
from pydub.utils import make_chunks
from pydub.silence import split_on_silence
import textract
import math
import scipy.io.wavfile as wav

Keybase proof

I hereby claim:

  • I am acabrol on github.
  • I am kalden (https://keybase.io/kalden) on keybase.
  • I have a public key ASAi--CEodFxLFuuIKMNc6yo7TH0t6ekrgWCSR9_mKudhQo

To claim this, I am signing this object:

@acabrol
acabrol / openwrt_blacklist_update.sh
Last active December 13, 2020 15:08
Script to generate domains and ip blacklisting at dns resolver and iptables level for openwrt
#!/bin/bash
#based on tutorial http://www.s474n.com/project-turris-blokovani-reklam-a-trackeru/
#create blacklists database
mkdir -p /etc/blacklists/db
#download latest version of blacklists and exclude categories not blocked from https://dsi.ut-capitole.fr/blacklists/
curl ftp://ftp.ut-capitole.fr/pub/reseau/cache/squidguard_contrib/blacklists.tar.gz| tar -xzf - -C /etc/blacklists/db blacklists/
cd /etc/blacklists/db
@acabrol
acabrol / ubuntu_squid_dansguardian_transparent_proxy_setup.sh
Last active October 26, 2017 23:34
Script to automate install of Dansguardian with Squid as transparent proxy on Ubuntu without iptables (assuming that proxy is used by a router)
#!/bin/bash
#based on https://help.ubuntu.com/community/DansGuardian
#refresh repositories
sudo apt-get update
# install packages
sudo apt-get install clamav-freshclam dansguardian squid curl
#turn squid into transparent proxy
sudo sed -i 's/http_port 3128/http_port 3128 transparent/g' /etc/squid/squid.conf
#always direct allow all
sudo sed -i 's/# always_direct allow local-servers/always_direct allow all/g' /etc/squid/squid.conf