Skip to content

Instantly share code, notes, and snippets.

@sennajox
sennajox / run_fio.sh
Last active December 21, 2023 11:00
A script that runs fio test and genearates a simple result for each jobs
#!/bin/bash
if [ $# -lt 2 ]; then
echo "usage:$0 dev output_dir [iodepth]"
echo "example 1: Testing the whole block device. Attention: That will destory the filesystem on the target block device"
echo "./run_fio.sh /dev/sdb fio_test"
echo ""
echo "example 2: Testing a file, but not destory filesystem. Suppose the target device mount on /data"
echo "fallocate -l 1G /data/test.dat"
echo "./run_fio.sh /data/test.dat fio_test"
@lackac
lackac / haproxy.cfg
Created September 22, 2012 19:14
HAProxy configuration with Websocket support
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 2
log 127.0.0.1 local1 notice
defaults
mode http
log global
frontend all 0.0.0.0:80
@Changaco
Changaco / btrfs-undelete
Last active April 22, 2024 20:06
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo
@7castle
7castle / gist:5d38aeb5b545a43e6dbe
Created November 5, 2015 22:19
quorum fix all
Peetaur's Proxmox Quorum Magic 'Fix All'.
========================================
restarting these on the failed node, and the whole cluster might bring back quorum, fix corosync, and fix the red lights problem in the GUI. It's like rebooting without interrupting the VMs (reboot proxmox parts only).
To create this sequence, I used the order in /etc/rc2.d/, and then I tinkered until it worked:
Consider disabling HA first.
The procedure:
on all nodes, restart:
@briandk
briandk / CONTRIBUTING.md
Created March 18, 2016 20:29
A basic template for contributing guidelines that I adapted from Facebook's open source guidelines

Contributing to Transcriptase

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

We Develop with Github

@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".

@yohangdev
yohangdev / etc-network-interfaces
Last active May 27, 2024 07:15
Proxmox single IP public with bridge/local network (NAT)
# source: https://raymii.org/s/tutorials/Proxmox_VE_One_Public_IP.html
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
address 163.172.103.199
netmask 255.255.255.0
@sergey-dryabzhinsky
sergey-dryabzhinsky / sysctl-proxmox-tune.conf
Last active May 19, 2024 21:22
Most popular speedup sysctl options for Proxmox. Put in /etc/sysctl.d/
###
# Proxmox or other server kernel params cheap tune and secure.
# Try it if you have heavy load on server - network or memory / disk.
# No harm assumed but keep your eyes open.
#
# @updated: 2020-02-06 - more params used, adjust some params values, more comments on params
#
### NETWORK ###
@Pulimet
Pulimet / AdbCommands
Last active June 20, 2024 20:04
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@cmey
cmey / install-intel-opencl-drivers-for-linux.sh
Last active September 29, 2023 14:36
Intel OpenCL drivers for Linux
# get OpenCL driver automated installer (installs kernel 4.7)
curl https://software.intel.com/sites/default/files/managed/f6/77/install_OCL_driver.sh_.txt > install_OCL_driver.sh
chmod +x install_OCL_driver.sh
# install OpenCL driver
sudo ./install_OCL_driver.sh install
# check
ls /boot/vmlinuz-*intel*