Skip to content

Instantly share code, notes, and snippets.

View SwagDevOps's full-sized avatar

Dimitri Arrigoni SwagDevOps

  • Colmar, France
  • 06:48 (UTC +02:00)
View GitHub Profile
#!/usr/bin/env sh
# ```sh
# apt-get remove --purge bcmwl-kernel-source
# cd /usr/local/src
# git clone https://github.com/antoineco/broadcom-wl
# ```
# Current regulatory domain.
REG_COUNTRY=${REG_COUNTRY:-FR}
@SwagDevOps
SwagDevOps / hddtemp-report
Created April 8, 2018 13:12
Get all devices (hdd) temperatures at once.
#!/usr/bin/env sh
# Get all devices (hdd) temperatures at once.
#
# Sample of use:
#
# ```sh
# sudo hddtemp-report
# sudo hddtemp-report /tmp/hddtemp-report
# sudo hddtemp-report /tmp/hddtemp-report '%s: $alignr %s'
@SwagDevOps
SwagDevOps / volume-control
Last active March 17, 2018 14:45
Simple Volume Control based on ``pactl``
#!/usr/bin/env ruby
require 'shellwords'
# Simple Volume Control based on ``pactl``
#
# Sample of (CLI) use:
#
# ```
# volume-control up
#!/usr/bin/env sh
# config -------------------------------------------------------------
IMPORT_DIR='/var/kodi/imports'
OUTPUT_DIR='/var/kodi/series'
FILES_TIME='8'
# functions ----------------------------------------------------------
@SwagDevOps
SwagDevOps / nm-scripts.sh
Last active December 5, 2017 21:01
execute scripts when your machine is connected to a specific network
#!/usr/bin/env sh
#
# This script depends on ``nmcli`` (and network-manager).
#
# Use this script in a crontab to periodically execute scripts
# when your machine is connected to given networks.
#
# Scripts are stored in: ``~/.nm-scripts/${type}/${connection}``
#
# Sample crontab:
#!/usr/bin/env sh
#
# Use this script in a crontab to execute specific scripts when
# your machine is connected to a specific network
# scripts are stored in ``/etc/network/scripts/${NETWORK_NAME}``
#
# Also ensure to restart failed miredo (if present)
#
# Using "Ubuntu 16.10" with "wicd 1.7.4 (bzr-r961)"
# scripts as ``postconnect`` are not properly executed, even when
@SwagDevOps
SwagDevOps / .bashrc
Last active May 12, 2022 21:53
Bash minimal for Freebsd
# -*- coding: utf-8 -*-
# vim: ft=sh
# ~/.bashrc: executed by bash(1) for non-login shells
#
# When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option,
# it first reads and executes commands from the file /etc/profile, if that file exists.
# After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
# in that order, and reads and executes commands from the first one that exists and is readable.
@SwagDevOps
SwagDevOps / vendor.conf
Last active July 3, 2016 17:02
Sample DNS cache configuration (unbound)
# vim: set filetype=config :
# /etc/unbound/unbound.conf.d/vendor.conf
server:
verbosity: 1
extended-statistics: yes
num-threads: 8
root-hints: ""
auto-trust-anchor-file: ""
@SwagDevOps
SwagDevOps / .profile
Created February 21, 2016 15:04
Shell startup file used on Android (bash v4.1 & busybox v1.21) through ssh
# coding: utf-8
# file: /data/data/com.arachnoid.sshelper/home/.profile
# environ #######################
export PATH=/data/data/burrows.apps.busybox.paid/app_busybox:$PATH
export LD_LIBRARY_PATH=/data/data/burrows.apps.busybox.paid/app_busybox:$LD_LIBRARY_PATH
export HOME=/sdcard