Skip to content

Instantly share code, notes, and snippets.

View crbyxwpzfl's full-sized avatar
🖖
lower decks

f, crbyxwpzfl

🖖
lower decks
View GitHub Profile
@crbyxwpzfl
crbyxwpzfl / android.py
Last active February 21, 2022 11:50
hb windows vbox pythons
import requests
import time
import subprocess
#import privates variable
import sys
import os
sys.path.append(os.environ.get('privates'))
import privates
characteristic = sys.argv[3].strip("''")
@crbyxwpzfl
crbyxwpzfl / ambilight.py
Last active April 25, 2022 09:11
ambilight python
import sys
sys.path.append('/Users/mini/Downloads/private/')
import privates
from requests.auth import HTTPDigestAuth
import json
import colorsys
import requests
import math
import os
@crbyxwpzfl
crbyxwpzfl / git.md
Last active February 21, 2022 11:52
git in genral stuff

other tipps

chmod 700 ssh-privat if github rejects ssh key with permissions denied

for global use of git

add path/to/git/cmd to PATH env variable

commit without .gitconfig set

@crbyxwpzfl
crbyxwpzfl / dl.md
Last active February 21, 2022 11:31
youtube dl

dl see

cd /Volumes/transfer/see
out="/Volumes/transfer/see/%(title)s.%(ext)s"
url="https://youtube.com/playlist?list=PLaHzPX64jQ189iqTEvaWmvK0l1-Dt3ssP" #dl see
@crbyxwpzfl
crbyxwpzfl / protable homebridge.md
Last active February 21, 2022 11:24
portable homebridge notes

start-homebridge

cd $env:DESKTOP; node.exe .\nodejs\node_modules\homebridge\bin\homebridge homebridge -D -U .\nodejs\homebridge-dir

for global use

add 'DESKTOP' environment variable
add '%DESKTOP%\path\to\nodejs' to 'PATH' variable
add privates env variabel with value path\to\private #in config.json python imports privates.py via this env variable

nodejs portable

@crbyxwpzfl
crbyxwpzfl / 3141.md
Last active February 21, 2022 11:55
legacy spinala pi in general stuff

sudo apt-get install screen

nano ~/.bash_profile	#launche screen on boot add
if  [ -z $STY ] && [ $TERM != "screen" ]; then
/usr/bin/screen -xRR;
else
/usr/bin/screen -X hardstatus alwayslastline '[%H] %Lw%=%u %d.%m.%y %c '
fi
@crbyxwpzfl
crbyxwpzfl / pullreadlist.py
Created February 21, 2022 11:57
python to pull readlist and little save routine
from __future__ import unicode_literals
from types import DynamicClassAttribute
from distutils.dir_util import copy_tree
from pathlib import Path
import sys
import re
import subprocess
import os
import requests
import pathlib
@crbyxwpzfl
crbyxwpzfl / wall.py
Created February 21, 2022 11:59
python for tv volume and on of control
import requests
#import privates variable
import sys
import os
#sys.path.append(os.environ.get('privates'))
sys.path.append('/Users/mini/private/')
import privates
characteristic = sys.argv[3].strip("''")
@crbyxwpzfl
crbyxwpzfl / sensor.py
Created February 21, 2022 12:00
python for 3141 light sensor aptv
import os
import sys
import busio
import digitalio
import board
import adafruit_mcp3xxx.mcp3008 as MCP
from adafruit_mcp3xxx.analog_in import AnalogIn
characteristic = sys.argv[3].strip("''")
@crbyxwpzfl
crbyxwpzfl / thermo.py
Created February 21, 2022 12:01
python for hb thermostat colling fan 3141
#import privates variable
import sys
characteristic = sys.argv[3].strip("''")
Statuspath = "/home/pi/spinala/Status.txt"
if sys.argv[1] == "Get":
if characteristic == "Name":