Skip to content

Instantly share code, notes, and snippets.

View RoyBellingan's full-sized avatar

Roy Bellingan RoyBellingan

View GitHub Profile
@Jiab77
Jiab77 / real-time-php-fpm-status.md
Last active February 29, 2024 12:48
Real-time PHP-FPM Status

Real-time PHP-FPM Status

This gist will explain you how to enable an undocumented feature of PHP-FPM which will give a real-time performance stats.

Everybody knows the famous phpinfo() and the page it generates, right? Then the real-time PHP-FPM status page design is very similar.

image

Some informations from the top are not displayed to avoid security issues.

Enable PHP-FPM Status

@fabiomontefuscolo
fabiomontefuscolo / xz.markdown
Last active March 21, 2024 22:01
XZ and tricks

XZ

  1. Compress a file (filename.sql will be replaced by filename.sql.xz)
xz filename.sql
  1. Uncompress file (filename.sql.xz will be replaced by filename.sql)
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active March 26, 2024 18:18
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@YamashitaRen
YamashitaRen / 10-Bit H.264
Last active October 5, 2023 15:54
10-Bit H.264 explanation
10-Bit H.264
For all those who haven’t heard of it already, here’s a quick rundown about the
newest trend in making our encodes unplayable on even more systems: So-called
high-bit-depth H.264. So, why another format, and what makes this stuff
different from what you know already?
First off: What is bit depth?
In short, bit depth is the level of precision that’s available for storing color
information. The encodes you’re used to have a precision of 8 bits (256 levels)
@courtneyfaulkner
courtneyfaulkner / devices.c
Created December 11, 2013 22:20
List OpenCL platforms and devices
#include <stdio.h>
#include <stdlib.h>
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
int main() {
@Thinkscape
Thinkscape / mysql-backup-all.sh
Created March 27, 2012 11:38
Backup all mysql databases to separate archives, each table in separate file.
#!/bin/bash
#
# Backup all databases to separate archives.
# 1. Each table is dumped into separate *.sql file.
# 2. Each view is dumped into separate file with DEFINER=CURRENT_USER.
# 3. All routines are dumped into routines-dbname.sql,
# 4. All files are added to archive dbname.7z, compressed with 7-zip, max compression.
#
# Usage: mysqlback.sh /output/directory
#