Skip to content

Instantly share code, notes, and snippets.

View avargas's full-sized avatar

Angelo Vargas avargas

View GitHub Profile
@bendera
bendera / multimon.lua
Last active December 12, 2024 13:42
Multi-monitor devilspie2 config
-- https://www.howtoforge.com/tutorial/ubuntu-desktop-devilspie-2/
debug_print("--------------------------------------------------------------------------------")
debug_print("Window Name: ".. get_window_name());
debug_print("Application name: "..get_application_name())
debug_print("--------------------------------------------------------------------------------")
editor_workspace = 1
browser_workspace = 2
terminal_workspace = 1
@githubfoam
githubfoam / iperf cheatsheet
Last active December 2, 2021 12:48
iperf cheatsheet
===================================================server======================================================
$ hostnamectl
Static hostname: control-machine
Icon name: computer-vm
Chassis: vm
Machine ID: 4f8ea72f17144f5a86367a4aeeb5c3e4
Boot ID: b846f130028d48cb960e5498b75d11ef
Virtualization: oracle
Operating System: Ubuntu 18.04.1 LTS
Kernel: Linux 4.15.0-29-generic

Telegraf Technicolor Input Plugin

Telegraf plugin to collect up/down/status from Technicolor Cable Modems.

  1. Make sure Python dependencies are installed; pip install -r reqirements.txt
  2. Move telegraf-technicolor.py in /usr/local/bin or a suitable location to be executed.
  3. Make sure telegraf-technicolor.py is executable; chmod +x telegraf-technicolor.py
  4. Move input.technicolor.conf to /etc/telegraf/telegraf.d or Telegraf configuration location on your system. Adjust any settings, locations, etc. therein as needed, perhaps your measurement names.
  5. Kick Telegraf to reload configuration files.
@dave-burke
dave-burke / $JavaScript-Style.md
Last active March 13, 2023 16:59
Simple comparison of the Airbnb and StandardJs style guides

Simple comparison of the Airbnb and StandardJs style guides

Based on the things I actually care about.

Rule Airbnb Standard
Semicolons Required Never
Trailing Comma Required Never
Re-assign function param Never Allowed
++ Never Allowed
@SamMousa
SamMousa / vm.service
Created September 14, 2020 16:07
Virtualbox on ZFS in SystemD, proper shutdown and process management
# Inspired by https://blogging.dragon.org.uk/start-stop-virtualbox-with-systemd/
[Unit]
Description=Virtual Box Guest %I
After=network.target virtualbox.service zfs-volume-wait.service
Before=runlevel2.target shutdown.target
[Service]
User=root
Group=root
@m-radzikowski
m-radzikowski / script-template.sh
Last active July 1, 2026 17:56
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@Jiab77
Jiab77 / simple-multi-threaded-php-web-server.md
Last active June 27, 2024 21:24
An easy way to start the embedded PHP web server with the multi-thread option enabled or simulated when necessary.
@mzpqnxow
mzpqnxow / bash-run-framework.sh
Created July 7, 2021 16:28
Configurable Bash logging, tracing and exception handling with optional JSON logging support
#!/bin/bash
#
# (C) 2021, AG (github@mzpqnxow.com)
# BSD 3-Clause License
#
# Logging and tracing skeleton for Bash shell scripts
#
# Features
# --------
# - Verbose execution tracing to stderr or to a file; optional, via start_trace()