Skip to content

Instantly share code, notes, and snippets.

View sam2332's full-sized avatar

Lily Rudloff sam2332

  • Ingham County
  • Lansing, Michigan
View GitHub Profile
@sam2332
sam2332 / Gptfunction call her.py
Last active November 30, 2023 19:47
This is a decorator and a function to query GPT-4
import dotenv
dotenv.load_dotenv()
import sys
import os
import openai
openai.api_key = os.environ['OPENAI_KEY']
@piitaya
piitaya / assist_calendar.yaml
Last active March 7, 2024 23:10
Assist Calendar Blueprint
blueprint:
name: Assist Calendar
author: Piitaya
description: Use Assist and a calendar to schedule actions in natural language.
domain: automation
input:
calendar:
name: Calendar
description: All events in this calendar will be processed by Assist
selector:
@DefenestrateIT
DefenestrateIT / Another Light Blueprint Automation.yaml
Last active March 7, 2024 23:19
Another Light Blueprint Automation
blueprint:
name: Optional_Motion Light Switch Blueprint Automation
description: "# Optional_Motion Light Switch Blueprint Automation V:1.3\n
Is my take on Light Profiles with Automations. This version has the following profiles;\n
- Bright - (For Day time & Events, I need to be Awake; Bright eyed & bushy tailed).\n
- Dimmed - (For after sunset & before sunrise when i'm (still) thinking about bed, but I will want to be able to read the Funny pages).\n
- Night-Light - (For bed/sleep time, & you don't want to wake everyone else up, but you still want to see in an emergency; how to get to the Fridge)\n
- Colour-Loop - (Was to be Aurora-Australis, but colour-loop is easier to remember).\n
- Circadian - (For the rest of the house at night, & to get everyone in sync @ night with you).\n
- Adaptive - (This works really well with a bed/sleep input_boolean).\n
@atomicpapa
atomicpapa / tuya_zigbee_mini_remote.yaml
Last active March 7, 2024 23:08
blueprint tutorial
blueprint:
name: Tuya Zigbee Mini Remote
description: "Blueprint for use with Tuya Zigbee Mini Remote (YSR-MINI-Z) on Zigbee2MQTT"
domain: automation
input:
switch:
name: Tuya Zigbee Mini Remote
description: Aqara switch to use
selector:
entity:
@kdorff
kdorff / moisture-1.yml
Created May 18, 2022 02:32
ESPHome code for moisture sensors
# Reads analog data using an ads1115. Three moisture sensors and a battery sensor.
# Goes to sleep for an hour at a time.
# Uses a helper input_boolean to keep it from going to sleep, in case you want to update it.
esphome:
name: moisture-1
platform: ESP32
board: esp32dev
on_boot:
then:
@majacobs
majacobs / nag-blueprint.yaml
Last active March 7, 2024 23:08
Nag Blueprint
blueprint:
name: Nag
description: Sends nagging messages on a schedule
domain: automation
input:
datetime:
name: Datetime
description: Input to monitor
selector:
entity:
@yuanliwei
yuanliwei / adb shell monkey --port 1080.md
Created April 22, 2019 03:38
adb shell monkey --port 1080
/*
adb shell monkey --port 1080
adb forward tcp:1080 tcp:1080
telnet 127.0.0.1 1080

sleep 300
quit
done
type string
@nstarke
nstarke / release-android-debuggable.md
Last active June 26, 2024 15:20
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
@mjdorma
mjdorma / pyvbox: Capture network traffic from adapter.py
Last active August 24, 2018 15:43
pyvbox: Capture network traffic from adapter.
"""pyvbox: Capture network traffic from adapter.
"""
import os
import time
import virtualbox
# Assume machine is already running.
vbox = virtualbox.VirtualBox()
machine = vbox.find_machine("win7")
session = machine.create_session()