Skip to content

Instantly share code, notes, and snippets.

# Fetches data from https://www.energidataservice.dk/tso-electricity/elspotprices
# API documentation http://docs.ckan.org/en/latest/api/index.html#making-an-api-request
from datetime import datetime, timedelta
import time
import requests
from influxdb import InfluxDBClient
import paho.mqtt.client as mqtt
@wazerstar
wazerstar / m3u8.md
Created December 24, 2021 00:08 — forked from primaryobjects/m3u8.md
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@wazerstar
wazerstar / .FreeStandbyMemory.bat
Created November 14, 2019 22:48 — forked from AveYo/.FreeStandbyMemory.bat
FreeStandbyMemory.bat - ninja edits at https://pastebin.com/Kj36ug5h
/* 2>nul || title FreeStandbyMemory.bat by AveYo v2019.06.01
@echo off|| csc compiling snippet, advanced schedule, builtin add_remove - UPDATE: reliable free memory detection
set/a CLEAR_EVERY_MINUTES=1
set/a CLEAR_WHEN_UNDER_MB=512
set/a CLEAR_SYSTEMCACHEWS=0
:: check_admin_rights
reg query "HKEY_USERS\S-1-5-20\Environment" /v TEMP >nul 2>nul || (
color 0e & echo. & echo PERMISSION DENIED! Right-click %~nx0 ^& Run as administrator
@wazerstar
wazerstar / .. MediaCreationTool.bat .md
Created November 14, 2019 11:24 — forked from AveYo/.. MediaCreationTool.bat ..md
Universal MediaCreationTool.bat wrapper for all Windows 10 Redstone versions: 1607,1703,1709,1803,1809 with business (Enterprise) edition support

Preview1
Preview2

Update: adjusted script for easy splitting into a lite version (only missing generating RS1/RS2 business entries)

2018.10.10: reinstated 1809 [RS5]! using native xml patching for products.xml; fixed syntax bug with exit/b  
2018.10.12: added data loss warning for RS5  
2018.11.13: RS5 is officially back! + greatly improved choices dialog - feel free to use the small snippet in your own scripts  
2019.05.22: 1903 [19H1]  
2019.07.11: 1903 __release_svc_refresh__ and enable DynamicUpdate by default to grab latest CU