Skip to content

Instantly share code, notes, and snippets.

View Nader-abdi's full-sized avatar
🎈
Focusing

Nader Abdi Nader-abdi

🎈
Focusing
View GitHub Profile
@Nader-abdi
Nader-abdi / install-ffmpeg-centos.sh
Last active April 3, 2022 13:07 — forked from cbosco/install-ffmpeg-centos.sh
Compile ffmpeg with libfdk_aac in a Lambda-like environment (Amazon Linux, CentOS)
# Copied from https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
yum install -y autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
# NASM
cd ~/ffmpeg_sources
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.bz2
tar xjvf nasm-2.15.05.tar.bz2
@Nader-abdi
Nader-abdi / worker.js
Created September 2, 2022 10:20 — forked from n-ramdi/worker.js
Cloudflare worker to bypass Instagram new cross-origin policy on images (fixes net :: ERR_BLOCKED_BY_RESPONSE )
// Instagram started setting cross-origin-resource-policy: same-origin when it sees bad referer headers.
// this change leads to ERR_BLOCKED_BY_RESPONSE error and broken images if instagram image is embedded to external website.
// to mitigate this, simple image proxy can be used.
// Steps to install this worker:
// 1. Create CNAME cdn.<yourdomain.com> in your CloudFlare panel
// 2. Create new worker and put the code below into the worker code
// 3. Setup worker route so the worker launches on your cdn. subdomain.
// 4. Modify your image urls from
// https://scontent-arn2-1.cdninstagram.com/v/t51.2885-15/sh0xxx.jpg
// to: