Skip to content

Instantly share code, notes, and snippets.

@tonyfg
tonyfg / docker-compose.yml
Created Nov 18, 2020
Docker compose file for home assistant + domoticz + mosquitto + zigbee2mqtt
View docker-compose.yml
version: "3"
services:
domoticz:
image: linuxserver/domoticz:latest
container_name: domoticz
environment:
- PUID=19000
- PGID=19000
- TZ=Europe/Lisbon
volumes:
@humphreyja
humphreyja / active_admin.rb
Created Nov 13, 2019
Include react components into active admin using React On Rails.
View active_admin.rb
# config/initializers/active_admin.rb
#...
module ActiveAdmin
module Views
# Defines a `react_component` active admin component. It allows you
# to include react components into active admin using React On Rails.
# Example:
#
View Auto start puma via systemctl description
Article: https://github.com/puma/puma/blob/master/docs/systemd.md
#1 nano /etc/systemd/system/puma.service
#2 paste from puma.service
Commands:
# After installing or making changes to puma.service
systemctl daemon-reload
# Enable so it starts on boot
systemctl enable puma.service
@pinge
pinge / mobile.video.encoding.md
Last active Jun 7, 2021
Video and audio encoding for playback in Android and iOS devices
View mobile.video.encoding.md

Video and audio encoding for playback in Android and iOS devices

This document aims to provide an easy way encode video optimized for playback in mobile devices that use the Android or the iOS operating systems.

libx264 is used for (single or two-pass) video encoding and libfdk_aac for audio encoding.

ffmpeg, libx264 and libfdk_aac settings are optimized for playback quality and compatibility on Android and iOS. There is extensive documentation and references for each of the settings used and contributions are very welcome :)

@ispiropoulos
ispiropoulos / shelly.py
Created Aug 28, 2018
Shelly Switch Home Assistant Component
View shelly.py
"""
Support for The Shelly Wifi switch.
Save this file inside ".homeassistant/custom_components/switch" (create the folders if not present) and restart HASS.
usage example:
switch:
- platform: shelly
switches:
@ebidel
ebidel / coverage.js
Last active Mar 29, 2021
CSS/JS code coverage during lifecycle of page load
View coverage.js
Moved to https://github.com/ebidel/puppeteer-examples
@jjhiew
jjhiew / default.nginx.conf
Last active Nov 4, 2020
Nginx configuration to setup SSL Termination and Reverse Proxy for Sendgrid Link Tracking
View default.nginx.conf
# Should go into `/etc/nginx/sites-available` as file named `default`
# Redirect HTTP to HTTPS
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443;
View dlib and face_recognition on raspberry pi.md

Install dlib and face_recognition on a Raspberry Pi

Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.

Steps

Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.

Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.

@u1-liquid
u1-liquid / update-sentry.sh
Last active Apr 29, 2019
Update Sentry on Docker
View update-sentry.sh
#!/bin/sh
sudo docker stop sentry-worker sentry-cron
sudo docker stop sentry sentry-smtp sentry-postgres sentry-redis
sudo docker rm sentry-worker
sudo docker rm sentry-cron
sudo docker rm sentry
sudo docker rm sentry-smtp
sudo docker rm sentry-postgres
@itod
itod / split_keyboards.md
Last active Jun 19, 2021
Every "split" mechanical keyboard currently being sold that I know of
View split_keyboards.md