Skip to content

Instantly share code, notes, and snippets.

Dustin Rue dustinrue

Block or report user

Report or block dustinrue

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:22d2f90c97d94c5ef9433babd8665ba5
input_boolean:
house_fan:
name: "House Fan"
initial: off
icon: mdi:fan
house_fan:
friendly_name: "House Fan"
value_template: "{{ is_state('input_boolean.house_fan', 'on') }}"
turn_on:
@dustinrue
dustinrue / mariadb.rb
Created Nov 3, 2018
homebrew mariadb formulae to build the aws key management plugin
View mariadb.rb
class Mariadb < Formula
desc "Drop-in replacement for MySQL"
homepage "https://mariadb.org/"
url "https://downloads.mariadb.org/f/mariadb-10.3.10/source/mariadb-10.3.10.tar.gz"
sha256 "57767c048982811c7ab21d8527f6f36aa897386e8c7235f11b5505a924d68eda"
bottle do
sha256 "eec1102078f2ed74ee9e4f4fdba5a2b1c41d883b4499309034690b1aa7ea303a" => :mojave
sha256 "936859611a5206ff3f13cb99ec69eb1344bab3734a14ad8a35ff276dac6f83a4" => :high_sierra
sha256 "e946558c449fdb9686df3f82fdb5ce7ab192f2ccf0d88f18ece27a51932a2000" => :sierra
View example upstream
upstream ups {
server 192.168.86.251;
}
server {
location /ups {
proxy_pass http://ups/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
View reboot.yml
- name: Disable SE Linux
selinux:
state: disabled
register: selinux
tags:
- selinux
- block:
- name: Restart and wait on server if selinux changed
shell: sleep 2 && shutdown -r now "Ansible package updates triggered"
View temp2mqtt.ino
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>
#include <SimpleTimer.h>
#define DHTPIN 2
#define DHTTYPE DHT22
const char* ssid = "ssid";
const char* password = "password";
View gist:5983cb1ea6482e4243ea275975a10d46
aws ec2 describe-images \
--owners 'aws-marketplace' \
--filters 'Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce' \
--query 'sort_by(Images, &CreationDate)[-1].[ImageId]' \
--output 'text'
View gist:69fdfb30f70550c0d9c8b0d1469bfafe
mkdir -p /opt/minio/data
mkdir /opt/minio/cofig
docker run -d -p 9000:9000 \
--name minio \
-v /opt/minio/data:/data \
-v /opt/minio/config:/root/.minio \
minio/minio server /data
@dustinrue
dustinrue / gist:5991686
Created Jul 13, 2013
harlem shake at apple store
View gist:5991686
javascript:(function()%7Bfunction%20c()%7Bvar%20e=document.createElement(%22link%22);e.setAttribute(%22type%22,%22text/css%22);e.setAttribute(%22rel%22,%22stylesheet%22);e.setAttribute(%22href%22,f);e.setAttribute(%22class%22,l);document.body.appendChild(e)%7Dfunction%20h()%7Bvar%20e=document.getElementsByClassName(l);for(var%20t=0;t%3Ce.length;t++)%7Bdocument.body.removeChild(e%5Bt%5D)%7D%7Dfunction%20p()%7Bvar%20e=document.createElement(%22div%22);e.setAttribute(%22class%22,a);document.body.appendChild(e);setTimeout(function()%7Bdocument.body.removeChild(e)%7D,100)%7Dfunction%20d(e)%7Breturn%7Bheight:e.offsetHeight,width:e.offsetWidth%7D%7Dfunction%20v(i)%7Bvar%20s=d(i);return%20s.height%3Ee&&s.height%3Cn&&s.width%3Et&&s.width%3Cr%7Dfunction%20m(e)%7Bvar%20t=e;var%20n=0;while(!!t)%7Bn+=t.offsetTop;t=t.offsetParent%7Dreturn%20n%7Dfunction%20g()%7Bvar%20e=document.documentElement;if(!!window.innerWidth)%7Breturn%20window.innerHeight%7Delse%20if(e&&!isNaN(e.clientHeight))%7Breturn%20e.clientHeight%7Dreturn%200
@dustinrue
dustinrue / tunnelbroker-net.sh
Created Oct 20, 2012 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
View tunnelbroker-net.sh
#!/bin/bash
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x
@dustinrue
dustinrue / tunnelbroker-net.sh
Created Oct 20, 2012 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
View tunnelbroker-net.sh
#!/bin/bash
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x
You can’t perform that action at this time.