Skip to content

Instantly share code, notes, and snippets.

View dfridrich's full-sized avatar
😎
¡Hola!

Dennis Fridrich dfridrich

😎
¡Hola!
View GitHub Profile
@bruxy70
bruxy70 / air-quality.yaml
Last active April 17, 2025 10:27
ESPHome configuration for Vindriktning ESP32 kit https://www.laskakit.cz/laskakit-esp-vindriktning-esp-32-i2c/
substitutions:
device_name: air-quality
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
api_password: !secret api_password
ota_password: !secret ota_password
esphome:
name: ${device_name}
comment: IKEA LaskaKit ESP-VINDRIKTNING ESP-32 I2C
@taufek
taufek / pre-push
Last active January 10, 2023 17:40
PrePush Git Hook with PhpCs and PhpStan
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
exec < /dev/tty
@dannygsmith
dannygsmith / valet-plus-destroy
Last active July 18, 2023 09:07
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@beyerz
beyerz / download.php
Created August 3, 2017 07:39
Symfony console, download remote file with progress bar using guzzle
/**
* @param SymfonyStyle $io
* @param $remotePath
*
* @return string
*/
public function download(SymfonyStyle $io, $remotePath)
{
$io->section("Download " . $remotePath);
$parts = parse_url($remotePath);
@nickels
nickels / supervisor.md
Last active August 29, 2022 13:25
Supervisor sudoers setup
groupadd supervisor
usermod -a -G supervisor <myusername>

/etc/supervisor/supervisor.conf

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0770                      ; socket file mode (default 0700)
chown=root:supervisor
@markhowellsmead
markhowellsmead / email_not_specific_domain.txt
Last active October 30, 2024 10:39
Regex for valid email address excluding specific free domains, like Gmail, GMX and Yahoo. Extend the list of domains according to your own requirements.
^([\w.-]+)@(\[(\d{1,3}\.){3}|(?!hotmail|gmail|googlemail|yahoo|gmx|ymail|outlook|bluewin|protonmail|t\-online|web\.|online\.|aol\.|live\.)(([a-zA-Z\d-]+\.)+))([a-zA-Z]{2,4}|\d{1,3})(\]?)$
@TorbenKoehn
TorbenKoehn / semantic-ui-form-theme.html.twig
Created July 29, 2016 07:09
Symfony/Twig Semantic UI Form Theme
{% use 'form_div_layout.html.twig' %}
{% block form_start -%}
{% set attr = attr|merge({class: (attr.class|default('') ~ ' ui form')|trim}) %}
{{- parent() -}}
{%- endblock form_start %}
{# Widgets #}
{% block form_widget_simple -%}
@Uchean
Uchean / clamav-mac.md
Created December 9, 2015 23:36
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@pankaj28843
pankaj28843 / Make soffice command of Libreoffice work on Mac OS X.md
Last active February 12, 2025 06:47
Make soffice command of Libreoffice work on Mac OS X

Deprecated Notice

This script, originally created on April 29, 2015, addressed a different behavior of LibreOffice installation on macOS at that time. However, it is now outdated and no longer relevant. Please refer to the latest comments for updated information, as much has changed over the past 8–9 years.


Quick Start

sudo curl https://gist.githubusercontent.com/pankaj28843/3ad78df6290b5ba931c1/raw/soffice.sh &gt; /usr/local/bin/soffice &amp;&amp; sudo chmod +x /usr/local/bin/soffice
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active October 18, 2025 20:22
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport