Skip to content

Instantly share code, notes, and snippets.

View denji's full-sized avatar
🇺🇦

Denis Denisov denji

🇺🇦
View GitHub Profile
@ShannonScott
ShannonScott / Video Screen Capture with GStreamer.md
Created October 30, 2019 16:28
[Video Screen Capture with GStreamer] Capture a Linux desktop window video with gsteramer. #tags: gstreamer, linux, xwindows, video

Capture a video of a given X Window with gstreamer.

X Window ID

Get the target window ID with the following:

xwininfo
@fartbagxp
fartbagxp / dig-edns.md
Created October 6, 2019 07:32
Testing eDNS with dig
@nucliweb
nucliweb / Image-Video-Optimization.md
Last active September 21, 2023 07:26
Twitter accounts you should follow if you like Image & Video Optimization
@ShannonScott
ShannonScott / readme.md
Last active June 4, 2023 20:35
[Moving efficiently in the CLI] Key-combination reference for movement in the shell. #tags: mac, linux, bash
@ShannonScott
ShannonScott / readme.md
Last active August 17, 2025 03:34
[Transcode h265] Use ffmpeg to transcode a video to h.265 / hvc1 which will play natively on a Mac (and Linux). #tags: video, python, ffmpeg
@kekru
kekru / 01nginx-tls-sni.md
Last active November 27, 2025 08:33
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@Sawaba
Sawaba / javainstall.sh
Created March 6, 2019 16:02
Java JDK 11 install script for Windows Subsystem for Linux (WSL)
#!/bin/bash
# This script adapted from an older post on StackOverflow by user fieldju
# https://stackoverflow.com/questions/36478741/installing-oracle-jdk-on-windows-subsystem-for-linux
# The script was for JDK 8.
# Due to major changes with JDK 11 (no JRE, no Derby, Unlimited Strength included), it was necessary to update the entire script.
set -ex
# UPDATE THESE URLs (this one updated as of 2019-03-06)
export JDK_URL=http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.tar.gz
@hadrianw
hadrianw / forktest.c
Last active January 29, 2019 13:51
Test Linux fork/vfork+exec(dynamic/static binary) performance. Dependecies: gcc, musl-dev, musl-tools (musl-gcc). Usage: $ chmod +x forktest.c $ ./forktest.c 100000
#if 0
set -e;
cflags="-O2 -Wall -Wextra -pedantic -std=c99"
[ "$0" -nt "$0-regular.bin" ] &&
gcc $cflags -lpthread "$0" -o "$0-regular.bin"
[ "$0" -nt "$0-static.bin" ] && {
mkdir -p musl-inc
@rgov
rgov / telnet_transfer.py
Created January 19, 2019 01:33
File transfer-over-Telnet. For when you have no other option.
#!/usr/bin/env python
'''
File transfer-over-Telnet. For when you have no other option.
There are probably better ways to do this.
This expects the server to drop you into a shell immediately upon connection.
It also expects the `openssl` tool to be available.
The file is transferred in small Base64-encoded chunks. After each chunk, a
@micahhausler
micahhausler / jq-filter.sh
Last active September 21, 2023 07:27
GitHub collaborator finder
# Go to https://developer.github.com/v4/explorer/ and enter the graphql query with the query veriable:
# {"queryString": "your-githubuser-name"}
cat results.json |
jq '.data.user.repositories.edges[] | { Count: .node.collaborators.totalCount, Repo: .node.name} | select(.Count > 2)'