Skip to content

Instantly share code, notes, and snippets.

View mtompkins's full-sized avatar
💭
So Long, and Thanks for All the 🐠

Mark Tompkins mtompkins

💭
So Long, and Thanks for All the 🐠
View GitHub Profile
@mcastelino
mcastelino / Vagrant Libvirt - Custom QEMU Argument to support NVDIMM and other features.md
Created June 6, 2019 00:25
Vagrant Libvirt - Custom QEMU Argument to support NVDIMM and other features

Vagrant-libvirt QEMU customization

Vagrant libvirt allows the user to customize the virtual machines to add features and use QEMU options that are not exposed via the plugin itself. For this it uses the libvirt's custom QEMU arguments options which appends the args at the very end of the command line. This allows you to not only add new arguments, it allows you to also override the plugin constructed defaults.

In the snippet below the

  • machine and memory default plugin arguments are over-ridden
  • an additional NVDIMM device is created and added to the machine
@ruanbekker
ruanbekker / readme_setup.md
Last active September 28, 2024 12:47
Vault Server with Docker and Setting Up

Create the directory structure:

touch docker-compose.yml
mkdir -p volumes/{config,file,logs}

Populate the vault config vault.json:

@mcfrojd
mcfrojd / Shield_Intents.MD
Last active April 12, 2025 04:44
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@mosquito
mosquito / README.md
Last active April 13, 2025 18:03
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@Brainiarc7
Brainiarc7 / skylake-tuning-linux.md
Last active April 16, 2025 15:07
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

@Brainiarc7
Brainiarc7 / nvenc-capabilities-ffmpeg.md
Last active October 10, 2023 23:26
See the supported NVENC and NPP capabilities in your FFmpeg build

Quickly check for supported NVENC and NPP hardware acceleration capabilities in FFmpeg on your platform:

Depending on how you built ffmpeg, you may want to check the supported NVENC-based hardware acceleration capabilities in ffmpeg by running:

$ for i in encoders decoders filters; do
    echo $i:; ffmpeg -hide_banner -${i} | egrep -i "npp|cuvid|nvenc|cuda|nvdec"
done

Sample output (as on my testbed):

image: node:latest
cache:
paths:
- node_modules/
- app/bower_components
deploy_production:
stage: deploy
environment: Production
@pylover
pylover / a2dp.py
Last active April 17, 2025 03:30
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@mitchellkrogza
mitchellkrogza / fail2ban-reset-log-db.sh
Last active December 13, 2024 06:48
Bash script to reset Fail2Ban - clears / truncates log file and deletes the sqlite database - stops and restarts service during this process.
#!/bin/bash
# Bash Script by https://gist.github.com/mitchellkrogza
# ************************************************************
# This script clears the log file and database of Fail2Ban
# This resets Fail2Ban to a completely clean state
# Useful to use after you have finished testing all your jails
# and completed your initial setup of Fail2Ban and are now
# putting the server into LIVE mode
# ************************************************************
@dgmorales
dgmorales / Makefile
Last active October 9, 2024 09:53
Example Makefile for creating deb/rpm packages with jordansissel/fpm
# This is an example Makefile for quick package creation
#
# It uses FPM [1] to generate simple packages.
# - If you need more features or a greater quality package, use debian
# standard tools for packaging.
# - Do not use checkinstall. Use FPM instead.
#
# [1] (https://github.com/jordansissel/fpm/wiki)
# IMPORTANT: