Skip to content

Instantly share code, notes, and snippets.

@markusressel
markusressel / esphome_neopixel_clock_effect.yaml
Last active April 13, 2024 16:37
ESPHome configuration example to create an animated clock using the Neopixel 60 LED ring
Moved to https://github.com/markusressel/ESPHome-Analog-Clock
@CoMPaTech
CoMPaTech / sonoff-demo.yaml
Created March 12, 2019 19:53
ESPHome.io Sonoff POW R2
esphome:
name: sonoffv
platform: ESP8266
board: esp01_1m
wifi:
ssid: 'mywifi'
password: 'mysecret'
manual_ip:
static_ip: 192.168.1.20
@TerribleDev
TerribleDev / TargetLinkExtension.cs
Created January 22, 2019 00:15
A markdig extension so add target blank to absolute urls
public class TargetLinkExtension : IMarkdownExtension
{
public void Setup(MarkdownPipelineBuilder pipeline)
{
}
public void Setup(MarkdownPipeline pipeline, IMarkdownRenderer renderer)
{
var htmlRenderer = renderer as HtmlRenderer;
@tstellanova
tstellanova / setup_pigpiod.md
Last active April 26, 2024 09:23
Install pigpiod on Raspberry Pi 3 (RPi3) running raspbian buster

Install pigpio

If you're working with the rpi3's gpio, the pigpio library can be very handy.

sudo apt-get update
sudo apt-get install pigpio 

If you also want to access pigpio from python, install: sudo apt-get install python-pigpio python3-pigpio

Setup pigpiod service to run at boot

CEC-Detection

Want to control a TV over HDMI-CEC via a remote RasPi? Include the following as a switch:

platform: command_line
switches:
    tv_power:
      command_on: "ssh pi@<ip_address> -i /home/homeassistant/.homeassistant/id_homeassistant 'echo on 0 | cec-client -s -d 1'"
 command_off: "ssh pi@ -i /home/homeassistant/.homeassistant/id_homeassistant 'echo standby 0 | cec-client -s -d 1'"
@alirobe
alirobe / reclaimWindows10.ps1
Last active May 27, 2024 21:14
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 31, 2024 07:07
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@lg0
lg0 / toggleiTerm2icon
Last active January 11, 2018 02:51
show/hide iTerm2 Dock icon
# toggle iTerm Dock icon
# add this to your .bash_profile or .zshrc
function toggleiTerm() {
pb='/usr/libexec/PlistBuddy'
iTerm='/Applications/iTerm.app/Contents/Info.plist'
echo "Do you wish to hide iTerm in Dock?"
select ync in "Hide" "Show" "Cancel"; do
case $ync in
'Hide' )
@ondravondra
ondravondra / EFExtensions.cs
Created November 2, 2012 12:49
C# extension for executing upsert (MERGE SQL command) in EF with MSSQL
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
namespace EFExtensions