Skip to content

Instantly share code, notes, and snippets.

View 421p's full-sized avatar
🖥️
supervising daemons

Andrii B. 421p

🖥️
supervising daemons
View GitHub Profile
@OndraZizka
OndraZizka / switchHeadphones.sh
Last active May 29, 2024 13:43
Bluetooth headset - switch between quality sound + no mic (A2DP) and crappy sound and mic (HSP/HFP)
#!/bin/bash
#### Restart Bluetooth
if [ "$1" == "resetBT" ] ; then
sudo rfkill block bluetooth && sleep 0.1 && sudo rfkill unblock bluetooth;
exit;
fi;
#### Toggle listen/speak
if [ "$1" == "" -o "$1" == "toggle" ] ; then
@theel0ja
theel0ja / ejabberd letsencrypt.sh
Created February 19, 2018 12:32
ejabberd Let's Encrypt
cd /etc/letsencrypt/live/xmpp.your-domain.com
cat privkey.pem cert.pem chain.pem > /etc/ejabberd/ejabberd.pem
@huksley
huksley / docker-compose.yml
Last active August 31, 2018 17:04
Launches fully configured Graylog 2.3.1 instance
#
# Launches configured Graylog 2.3.1 instance
#
# - Docker-compose 1.16 required
# - Please configure following according to your network:
# * gelf-address URL (for each container)
# * GRAYLOG_WEB_ENDPOINT_URI
# - After launch define GELF tcp and GELF udp inputs in graylog web ui
# - Containers send logging to the graylog itself
# - By default tuned to 30 days retention
@mosquito
mosquito / README.md
Last active July 15, 2024 15:04
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. 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
@tyrell
tyrell / docker-install-rpi3.md
Last active December 22, 2023 07:36
Installing latest Docker on a Raspberry Pi 3

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

@tivnet
tivnet / php
Created January 4, 2014 14:55
To let PHP recognize Cygwin paths, put this file to /usr/local/bin/php and chmod +x Originally published by http://stackoverflow.com/users/264395/aefxx here: http://stackoverflow.com/questions/12276946/composer-cygwin
#!/bin/bash
# Path to the PHP executable
php="/cygdrive/c/PHP/php.exe"
for ((n=1; n <= $#; n++)); do
if [ -e "${!n}" ]; then
# Converts Unix style paths to Windows equivalents
path="$(cygpath --mixed ${!n} | xargs)"