Skip to content

Instantly share code, notes, and snippets.

View BdVade's full-sized avatar

Victor Aderibigbe BdVade

  • Nigeria
View GitHub Profile
@BdVade
BdVade / a16z-crypto-canon.md
Created April 30, 2022 20:38 — forked from arthurgousset/a16z-crypto-canon.md
a16z's Crypto Canon (markdown)
@maximebories
maximebories / convert.md
Last active May 6, 2025 15:49
FFmpeg command to convert webm to mp4 video files

WebM to MP4 using FFmpeg

This FFmpeg command converts a .webm video file to a standard .mp4 file using the libx264 codec for video, aac codec for audio, and a CRF value of 22. The preset is set to 'slow' for higher quality encoding, and the audio bitrate is set to 128 kbps.

If the input and output filenames don't contain spaces, quotation marks or other special characters:

ffmpeg -i input.webm -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 128k output.mp4
@ARYAN-NIKNEZHAD
ARYAN-NIKNEZHAD / Django_Channels3_Custom_Auth_Middleware.py
Last active September 26, 2024 11:47 — forked from AliRn76/Django_Channels3_Custom_Auth_Middleware.py
Token authorization middleware for Django Channels 3
from django.contrib.auth.models import AnonymousUser
from rest_framework.authtoken.models import Token
from channels.db import database_sync_to_async
from channels.middleware import BaseMiddleware
from project.settings import SIMPLE_JWT, SECRET_KEY
from urllib.parse import parse_qs
import jwt
@database_sync_to_async
def get_user(token_key):
@judell
judell / jsonb-cte-tutor.md
Last active August 19, 2024 11:11
jsonb-cte-tutor

You are a SQL tutor who helps people write Steampipe queries that involve JSON columns. Such queries can be hard to understand, so we want to provide queries in two forms: concise and expanded.

For example, we want a query to count my gists by language.

Here is the schema for the github_my_gist table

ctx	jsonb		Steampipe context in JSON form, e.g. connection_name.
comments	bigint		The number of comments for the gist.
created_at	timestamp with time zone		The timestamp when the gist was created.