Skip to content

Instantly share code, notes, and snippets.

View jb-alvarado's full-sized avatar
💭
I may be slow to respond.

jb-alvarado

💭
I may be slow to respond.
View GitHub Profile
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.4.83 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@jb-alvarado
jb-alvarado / gist:6b07aad900222287ac0b68c1e693bac8
Created August 25, 2017 13:55
mptcp config for redundant kernel bug
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.4.83 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@jb-alvarado
jb-alvarado / gist:2481a82142725c1cbfe3732eea6793f4
Created May 13, 2018 12:26
python3 wx ultimatelistctrl example
import wx
from wx.lib.agw import ultimatelistctrl as ULC
class MainPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
self.run_list = []
self.selected_obj = None
@jb-alvarado
jb-alvarado / disable-plugins-in-development.php
Last active June 14, 2018 12:03
Disable specified WordPress plugins in your development environment. Useful for plugins that either make network calls you don't want when working (eg, auto-posting to Facebook), or for plugins that rely on services only available in production (eg, Varnish).
<?php
/**
* Disable specified plugins in your development environment.
*
* This is a "Must-Use" plugin. Code here is loaded automatically before
* regular plugins load. This is the only place from which regular plugins
* can be disabled programatically.
*
* Place this code in a file in WP_CONTENT_DIR/mu-plugins or specify a
* custom location by setting the WPMU_PLUGIN_URL and WPMU_PLUGIN_DIR
@jb-alvarado
jb-alvarado / playbin_about-to-finish.py
Last active October 12, 2023 12:26
gstreamer python snips
#!/usr/bin/env python3
import gi
from urllib.parse import quote
gi.require_version('Gst', '1.0')
gi.require_version('GLib', '2.0')
from gi.repository import GLib, Gst
@jb-alvarado
jb-alvarado / build.sh
Created January 7, 2019 15:33
build gst-plugin-bad example playout.c
#/bin/bash
rm -rf *.o playout
rm -rf "./deps/*"
mkdir -p ".deps"
system=$( uname -s )
if [[ "$system" == "Darwin" ]]; then
_libtool="glibtool"
@jb-alvarado
jb-alvarado / hls.conf
Last active January 23, 2024 20:58
srs rtmp server with hls multiple bitrates
listen 1935;
max_connections 20;
daemon on;
pid /usr/local/srs/objs/srs.pid;
srs_log_tank file; # console;
srs_log_file /var/log/srs.log;
ff_log_dir /dev/null;
# can be: verbose, info, trace, warn, error
srs_log_level warn;
@jb-alvarado
jb-alvarado / pci-passthrough.md
Last active October 27, 2023 02:16
PCI Passthrough on Fedora 31

PCI Passthrough

Hardware:

  • Mainboard ASUS PRIME Z390-A Z390
  • ASUS Dual-GTX1650-O4G
  • Intel i9 9900
  • 32GB Ram
  • NEC Corporation uPD720200 USB 3.0 Host Controller
  • Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 (1 TB)

Install CentOS 8.2 on IBM x3650 M3

  1. prepare 2 USB sticks
  • first with Centos 8.2 minimal
  • second with correct version of dd-megaraid_sas driver from elrepo.org
  • the USB stick for the megaraid driver should have the lable OEMDRV, other while the drive is not recognize
  1. plug both USB sticks on server and boot
  2. go with F12 in boot menu and select USB device
  3. go truth the steps from CentOS install process
#!/bin/bash
# nano syntax highlighting
cat <<EOT > /usr/share/nano/config.nanorc
# config file highlighting
syntax "conf" "(\.(bashrc|zshrc|conf|config|cfg|cnf|cf|rc|lst|list|defs|ini|desktop|mime|types|preset|cache|seat|service|htaccess)$|(^|/)(\w*crontab|mirrorlist|group|hosts|passwd|rpc|netconfig|shadow|fstab|inittab|inputrc|protocols|sudoers)$|conf.d/|.config/)"
# default text
color magenta "^.*$"