Skip to content

Instantly share code, notes, and snippets.

View thejeffreystone's full-sized avatar

Jeffrey Stone thejeffreystone

View GitHub Profile
@thejeffreystone
thejeffreystone / automations.yaml
Last active September 10, 2022 14:37
IFTTT Webhook Automation
- id: '1662424449450'
alias: IFTT Wenhook Example
description: ''
trigger:
- platform: webhook
webhook_id: ifttt_webhook
condition: []
action:
- choose:
@thejeffreystone
thejeffreystone / configuration.yaml
Created September 10, 2022 14:00
Home Assistant Zone Counter Sensor
# Include this in the confiuration,yaml, or any yaml file where you have sensor data
sensor:
# This sensor will count how many times I was in the
# "Work" zone in the last 7 days
- platform: history_stats
name: Jeff Time at Work
entity_id: person.jeffrey # The Device/person entity
state: 'Work' # The name of the Zone
type: count # This will give you the count, use time if you want duration
end: '{{ now() }}' # When the count should End
@thejeffreystone
thejeffreystone / gist:6bc41eb103094318795353ab2885abf3
Created December 16, 2021 15:52
Home Assistant - Randomized Lights Example
randomize_lights:
alias: randomize lights
sequence:
- repeat:
count: '8'
sequence:
- service: homeassistant.turn_on
data:
entity_id: "{{ expand('group.livingroom') | selectattr('state', 'eq', 'off') | map(attribute='entity_id') | list | random }}"
- delay:
@thejeffreystone
thejeffreystone / keybase.md
Last active September 12, 2019 12:27
keybase.md

Keybase proof

I hereby claim:

  • I am thejeffreystone on github.
  • I am thejeffreystone (https://keybase.io/thejeffreystone) on keybase.
  • I have a public key ASAZY4ufPVtTz152XK1xpq356sp3mc5Hwho_j69tsbyJOgo

To claim this, I am signing this object:

@thejeffreystone
thejeffreystone / Jarvis.py
Created December 9, 2016 14:11 — forked from GGulati/Jarvis.py
Pythom Speech Recognition
import speech_recognition
import pyttsx
speech_engine = pyttsx.init('sapi5') # see http://pyttsx.readthedocs.org/en/latest/engine.html#pyttsx.init
speech_engine.setProperty('rate', 150)
def speak(text):
speech_engine.say(text)
speech_engine.runAndWait()
@thejeffreystone
thejeffreystone / 0_reuse_code.js
Created December 9, 2016 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@thejeffreystone
thejeffreystone / pre-commit
Created March 21, 2016 15:42 — forked from stevendanna/pre-commit
Pre-commit hook to help prevent key leakage
#!/bin/bash
#
# Warn about possible cloud access keys before committing
#
exec </dev/tty
unset possible_keys
possible_keys=$(git diff --cached | egrep '^[+\-].*(AKIA|AWS_ACCESS|AWS_SECRET|OS_PASSWORD|OS_USERNAME)')
if [[ -n "$possible_keys" ]];then
echo -e "WARNING: Diff contains possible access keys:\n"
echo "${possible_keys}"
@thejeffreystone
thejeffreystone / install_splunk.sh
Created January 7, 2016 01:40 — forked from stamler/install_splunk.sh
Install Splunk Enterprise 6.2 on CentOS 7 Minimal as a non-root user systemd service and enable syslog on port 514 and http on port 80
#!/bin/bash
# Install Splunk 6.2 on CentOS 7 as a non-root user service that runs on boot with
# systemd. This script also opens the firewall to allow syslog on UDP port 514. Since
# we're running Splunk as non-root, this port is then forwarded to 5514. Configuring a
# syslog input in slunk on UDP 514 will gather this data. Must be run as root
# Create Account
useradd splunk
groupadd splunk
<?php
use Illuminate\Auth\UserProviderInterface as UserProvider;
use Illuminate\Auth\UserInterface as UserInterface;
class LdapProvider implements UserProvider{
public function __construct(){}
/**
@thejeffreystone
thejeffreystone / Vagrantfile
Last active August 29, 2015 14:06
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.33.21"