Skip to content

Instantly share code, notes, and snippets.

View ultramookie's full-sized avatar

steve mookie kong ultramookie

View GitHub Profile
@richlee91
richlee91 / zha_lutron_aurora_blueprint - toggle.yaml
Last active October 13, 2024 03:55
Blueprint for Lutron Aurora automations in ZHA. Toggles light on each button press
blueprint:
name: ZHA - Lutron Aurora Dimmer - Toggle v1.0
description: 'Control lights with a Lutron Aurora Dimmer Pressing in the dimmer
button will toggle lights regardless of dimmer status. Rotating the dimmer will increase and decrease the light brightness.
Adjust the sensitivity if updates from the dimmer are being sent too quickly. Based on the great work of bjpetit!'
domain: automation
input:
remote:
name: Lutron Aurora Dimmer Switch
description: Lutron Aurora Z3-1BRL
@dansup
dansup / deploy.sh
Last active July 29, 2019 20:08
Pixelfed development deployment script
cd /home/forge/pixelfed.social
git pull origin dev
composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
echo "" | sudo -S service php7.2-fpm reload
php artisan config:cache
php artisan migrate --force
php artisan horizon:purge
php artisan horizon:terminate
@fwenzel
fwenzel / b2.md
Last active July 31, 2023 04:40
Mastodon --> Backblaze B2

Using Mastodon with Backblaze B2

Mastodon can store its assets in Amazon S3 (it speaks the S3 protocol). But it does not, by default, speak to Backblaze B2.

There are a couple of reasons why you might want that:

  • you already know and trust B2
  • it's cheaper
  • you do not want to make your instance dependent on AWS
  • etc.
@vangheem
vangheem / tablo-export.py
Last active May 8, 2017 22:54
Export all your tablo vidoes
#
# Requirements:
# - Python >= 3.5
# - requests
# - aiohttp
#
import argparse
import asyncio
import json
import os
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active November 7, 2024 05:04
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@mkubenka
mkubenka / install.sh
Created April 23, 2016 19:28
OpenVPN Access Server Letsencrypt
#!/bin/sh
apt-get -y install git bc
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
mkdir /etc/letsencrypt
@0XDE57
0XDE57 / config.md
Last active October 20, 2024 13:07
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@OnlyInAmerica
OnlyInAmerica / make-mega-adblock-hostsfile.sh
Last active September 24, 2024 14:40
Create Mega Adblock Hostsfile for use with Dnsmasq (Modified from Pi-hole)
#!/bin/bash
# Modified Pi-hole script to generate a generic hosts file
# for use with dnsmasq's addn-hosts configuration
# original : https://github.com/jacobsalmela/pi-hole/blob/master/gravity-adv.sh
# The Pi-hole now blocks over 120,000 ad domains
# Address to send ads to (the RPi)
piholeIP="192.168.1.1"
outlist='./final_blocklist.txt'
@zmwangx
zmwangx / Postfix: sender-dependent SASL authentication.md
Last active November 1, 2024 15:21
Postfix: sender-dependent SASL authentication — relay to multiple SMTP hosts, or relay to the same host but authenticate as different users (e.g., two Gmail accounts)

This is a sequel to "Postfix: relay to authenticated SMTP".

I would like to send mail from two different Gmail accounts using Postfix. Here is the relevant section in the Postfix documentation: Configuring Sender-Dependent SASL authentication.

As a concrete example, here's how to set up two Gmail accounts (only relevant sections of the config files are listed below):

/etc/postfix/main.cf:
    # sender-dependent sasl authentication
    smtp_sender_dependent_authentication = yes

sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay

@mrkline
mrkline / c_sharp_for_python.md
Last active September 2, 2024 15:51
An intro to C# for a Python developer. Made for one of my coworkers.

C# For Python Programmers

Syntax and core concepts

Basic Syntax

  • Single-line comments are started with //. Multi-line comments are started with /* and ended with */.

  • C# uses braces ({ and }) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,