Skip to content

Instantly share code, notes, and snippets.

@mixsoda
mixsoda / node-red.php
Created August 30, 2020 14:54
RPi-Cam-Web-Interface streaming page optimized for node-red embedding
<!DOCTYPE html>
<html>
<head>
<title>RPi Cam Preview</title>
<script src="js/script.js"></script>
<link rel="stylesheet" href="css/style_minified.css" />
</head>
<body onload="setTimeout('init(0,1,1);', 100);" style="padding-top:0px">
<img id="mjpeg_dest" onClick="toggle_fullscreen(this);" />
</body>
@mixsoda
mixsoda / pushbullet.py
Created October 8, 2019 16:54
Python script to send push notification using Pushbullet
import requests
import json
def push_message(title, body):
token = "your API token"
url = "https://api.pushbullet.com/v2/pushes"
headers = {"content-type": "application/json", "Authorization": 'Bearer '+token}
data_send = {"type": "note", "title": title, "body": body}
@mixsoda
mixsoda / opt_image.bat
Last active May 6, 2019 14:09
Drag & Drop Image optimizer front end for Windows
@echo off
cd /d %~dp1
for %%q in (%*) do (
echo TARGET FILE : %%~nxq
REM *** PNG FILE ***
if %%~xq == .png (
call :OPTIMIZE_PNG "%%~nxq"
)