Skip to content

Instantly share code, notes, and snippets.

View dreadfullyposh's full-sized avatar

Jeremy Gimbel dreadfullyposh

View GitHub Profile
version: "3.3"
#To run use: podman-compose --env-file=default.env
#File default.env is:
# ROOT_PASSWORD=<password>
# GITLAB_SSH=2222
# GITLAB_SSH=<password>
# ACME_EMAIL=<username>@gmail.com
# EXT_HOSTNAME=<hostname>
# SMTP_EMAIL=<username>@gmail.com
@mdegat01
mdegat01 / update_notifications.yaml
Last active May 8, 2025 09:19
Update Notifications Automation Blueprint
blueprint:
name: Update notifications
description: Send notifications for new updates and install or skip on action
homeassistant:
min_version: '2022.4.0'
domain: automation
input:
update_entities:
name: Update entities
description: >-
@ondrej-janosik
ondrej-janosik / bitbucket-pipelines.yml
Last active May 4, 2021 15:20
Using NPM CI and Cypress with Bitbucket Pipelines
# Check out my blog post about this topic at https://medium.com/@ondrej.janosik42/setting-up-bitbucket-pipelines-with-proper-caching-of-npm-and-cypress-74d033888186
image: node:10.8.0
options:
max-time: 30
pipelines:
default:
- step:
name: Install, build and tests
caches:
- npm
@Ariel-Rodriguez
Ariel-Rodriguez / semver.sh
Last active April 14, 2025 12:33
semver compare tool in bash
#!/bin/bash
# THIS IS AN OBSOLETE SCRIPT WITH BUGS. FOR UPDATED VERSIONS PLEASE CHECK https://github.com/Ariel-Rodriguez/sh-semversion-2
###
# semantic version comparition using semver specification http://semver.org/
# This bash script compares pre-releases alphabetically as well
#
# returns 1 when A greater than B
# returns 0 when A equals B
@toniher
toniher / Dockerfile
Created September 3, 2016 07:39
Example of changing uid and gid of a Docker image - MariaDB
FROM mariadb:10.1
# To be changed here
ENV MYSQL_UID 27
ENV MYSQL_GID 27
RUN usermod -u $MYSQL_UID mysql; groupmod -g $MYSQL_GID mysql;
RUN chown -R mysql:mysql /var/lib/mysql /var/run/mysqld
@cferdinandi
cferdinandi / pandoc-cheatsheet.md
Last active April 23, 2024 17:49
CLI cheats for creating a markdown ebook with Pandoc.

epub

pandoc assets/metadata.yml chapters/*.md -o book.epub -S

pdf

Using WKHTMLtoPDF (no page numbers)

@gbaman
gbaman / HowToOTG.md
Last active May 9, 2025 20:48
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE