Skip to content

Instantly share code, notes, and snippets.

View zenofile's full-sized avatar

zenofile zenofile

View GitHub Profile
@zenofile
zenofile / Firefox Pretty Tree Style Tab.md
Created August 9, 2024 05:46 — forked from theprojectsomething/Firefox Pretty Tree Style Tab.md
Tree Style Tab: Sliding sidebar / pinned + active tabs

Firefox pretty sliding sidebar / pinned / active tab theme for Tree Style Tab

Features

  • Auto-sliding draw for TST
  • Leaves 'pinned' and 'active' tabs visible in standard browser chrome
  • Leaves 'last-active' tabs visible for 3 minutes after becoming inactive
  • Where an active tab is pinned, leaves 'last-active' tab (x1) visible for 1hr

tree-style-tabs-theme

remove gnome apps

sudo dnf remove gnome-tour gnome-abrt gnome-calculator gnome-calendar gnome-maps gnome-weather \
    rhythmbox gnome-contacts totem gnome-logs gnome-photos gnome-clocks gedit gnome-system-moniter \
    gnome-user-docs gnome-screenshot gnome-remote-desktop

remove fedora chromium policies

sudo dnf remove fedora-chromium-config
@zenofile
zenofile / README.md
Created September 1, 2022 13:51 — forked from gdamjan/README.md
Install a NixOS for a systemd-nspawn container … from podman

Install

Run a nix container with podman, with the container destination mounted as /mnt:

DEST=~/containers/nixos
mkdir -p $DEST/{dev,proc,etc/nixos}

podman run -v $DEST:/mnt -it --rm --cap-add SYS_ADMIN docker.io/nixos/nix:latest
@zenofile
zenofile / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created August 4, 2022 21:29 — forked from Brainiarc7/VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
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".

@zenofile
zenofile / remove_old_builds.sql
Created April 13, 2022 01:39 — forked from david-zw-liu/remove_old_builds.sql
Keep 1000 builds per repos for DroneCI (sqlite3 version >= 3.25 required)
-- Thank @sbengo to figure out foreign_keys constraints is defaults to false in sqlite
-- Enable to delete logs by cascading delete
PRAGMA foreign_keys = ON;
WITH n_build_ids_per_repo as (
SELECT build_id
FROM (
SELECT
build_id,
build_repo_id,
/*
* ctx_time Copyright (C) 2018 Matteo Croce <mcroce@redhat.com>
* a tool measure the context switch time in clock cycles
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
@zenofile
zenofile / build.sh
Last active August 16, 2024 06:17
Building a static tmux binary with musl
#!/usr/bin/env bash
# vi: set ft=sh ts=4 sw=0 sts=-1 sr noet nosi tw=0 fdm=manual:
set -o errexit
declare -A version
version[musl]=1.2.4
version[libevent]=2.1.12
version[ncurses]=6.4
@zenofile
zenofile / README.md
Created May 22, 2021 03:03 — forked from pamolloy/README.md
Mesh network using VXLAN over Wireguard
@zenofile
zenofile / netmonitor.sh
Created May 22, 2021 02:35 — forked from talawahtech/netmonitor.sh
netmonitor.sh - A simple bash script to calculate throughput and pps
#!/bin/bash
# Bash script to calculate throughput and packets/sec
# Based on code from https://discuss.aerospike.com/t/benchmarking-throughput-and-packet-count-with-iperf3/2791
if [ -z "$1" ]; then
echo
echo usage: $0 [network-interface]
echo
echo defaulting to eth0
@zenofile
zenofile / txq.bt
Created May 22, 2021 02:33 — forked from talawahtech/txq.bt
txq.bt - monitor the length of an AWS ENA device's transmit queue
#include "txq.h"
kprobe:ena_com_prepare_tx
{
// grab/cast the transmit queue param
$io_sq = (struct ena_com_io_sq *) arg0;
// logic copied from from ena_com_free_q_entries
$queuelen = (uint16) $io_sq->tail - (uint16) $io_sq->next_to_comp;