Skip to content

Instantly share code, notes, and snippets.

@alexbaldwin
alexbaldwin / hue_lutron_aurora_blueprint - toggle.yaml
Last active October 15, 2023 21:05 — forked from richlee91/zha_lutron_aurora_blueprint - toggle.yaml
Blueprint for Lutron Aurora automations in Hue. Toggles light on each button press
blueprint:
name: Hue - 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
@alexbaldwin
alexbaldwin / transform.sh
Created May 24, 2020 00:15
MP4 Prepwork, upscales to 720p 16:9
for mp4 in *.mp4
do
echo $mp4
ffmpeg \
-i "$mp4" \
-y \
-r 15 \
-vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,format=yuv420p" \
-pix_fmt yuv420p \
@alexbaldwin
alexbaldwin / slate
Created August 16, 2018 18:47
Config for Slate.app
config defaultToCurrentScreen true
bind right:alt corner top-right resize:screenSizeX/2;screenSizeY
bind left:alt corner top-left resize:screenSizeX/2;screenSizeY
bind up:alt corner top-left resize:screenSizeX;screenSizeY
@alexbaldwin
alexbaldwin / ping-sys.js
Created August 8, 2018 23:59
Ping override
/**
* LICENSE MIT
* (C) Daniel Zelisko
* http://github.com/danielzzz/node-ping
*
* a simple wrapper for ping
* Now with support of not only english Windows.
*
*/
@alexbaldwin
alexbaldwin / readme.md
Created August 8, 2018 02:23
Install Pi-hole on Synology w/ Docker

Abbreviated instructions for setting up pi-hole without disrupting your existing network. Replace 192.168.7.47 with your Synology's internal IP address.

  1. Under Docker / Image, add https://hub.docker.com/r/pihole/pihole/ from URL. Select latest.
  2. Create a new container using the previously added image. Use the following advanced settings:
  • Enable auto-restart
  • Override the ports:
    53 -> 53
    53 -> 53
    

8181 -> 80

@alexbaldwin
alexbaldwin / images.md
Created February 23, 2018 23:47
Optimizing your images

Photos

Anything that comes out of a camera is going to be best suited as a JPG, which allows for the largest color palette size and has great compression.

  1. Export as a JPG.
  2. Make the width 2X the resolution you plan to use it at.
  3. Optimize using ImageOptim to get rid of meta data you don't need.

Logos

@alexbaldwin
alexbaldwin / post_from_ready.rb
Created February 16, 2018 23:04
Post images from the ready folder
require 'fastimage'
require 'shellwords'
require 'tty-command'
require 'mini_exiftool'
require 'dotenv/load'
cmd = TTY::Command.new
# Wait up to 2 hours before posting
sleep (0..7200).to_a.sample
@alexbaldwin
alexbaldwin / chatterbot.rb
Created June 8, 2017 22:58
Twitter follow and response
#!/usr/bin/env ruby
# https://github.com/muffinista/chatterbot#what-can-i-do
require 'rubygems'
require 'chatterbot/dsl'
# consumer_key 'consumer_key'
# consumer_secret 'consumer_secret'
# secret 'secret'
# token 'token'
@alexbaldwin
alexbaldwin / hack-design-2016-survey.csv
Created October 28, 2016 00:54
Hack Design 2016 Survey Results
How do you practice design? What design topics are you most interested in? Who are the most helpful designers you follow? If you had a magic wand to add, remove, or change anything about Hack Design, what would you do with it? Anything else you want to tell us about Hack Design?
By contests Proportion, white space, Visual hierachy & weight David kadey, Json santa maria, Trevis Nelson Specail assignments after each lesson for all lessons. It must be projects of designing a app or webpage or wirefriming Platform where the assogments can reviwed
Luke Wroblowski Bjango PDF link instead of emails
Product designer Digital design, UI, UX, brand strategy, front end dev, VR Julie Zhuo
@alexbaldwin
alexbaldwin / gswscore.rb
Created October 26, 2016 05:02
Posts the Warriors Score if there's a current game
require 'awesome_print'
require 'faraday'
require 'twitter'
require 'json'
require 'date'
require 'time'
date = Time.now.strftime("%Y%m%d")
url = "http://data.nba.net/data/10s/prod/v1/#{date}/scoreboard.json"