Skip to content

Instantly share code, notes, and snippets.

View pipizhang's full-sized avatar
👽

Peter Zhang pipizhang

👽
View GitHub Profile
@RogerRordo
RogerRordo / get_automatic_captions.py
Last active April 5, 2021 06:55
20201212-临时解决youtube_dl无法下载自动字幕的问题
#替换youtube-dl/extractor/youtube.py的_get_automatic_captions函数
def _get_automatic_captions(self, video_id, webpage):
"""We need the webpage for getting the captions url, pass it as an
argument to speed up the process."""
self.to_screen('%s: Looking for automatic captions' % video_id)
err_msg = 'Couldn\'t find automatic captions for %s' % video_id
pattern = r'var\s*ytInitialPlayerResponse\s*=\s*({.+?});'
@petitviolet
petitviolet / nginx_deployment.yaml
Created March 11, 2018 11:04
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active February 25, 2026 03:40
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@steve-ng
steve-ng / nginx.conf
Last active May 28, 2024 08:27
Nginx reverse proxy wss with ssl
server {
listen 443 ssl;
server_name xxx.xx.io
ssl on;
ssl_certificate /etc/asterisk/certs/xxx.io.pem;
ssl_certificate_key /etc/asterisk/certs/xxx.io.key;
ssl_session_timeout 5m;