Skip to content

Instantly share code, notes, and snippets.

View yottatsa's full-sized avatar
🏳️‍⚧️
microsoft is transphobic

Atsuko Ito yottatsa

🏳️‍⚧️
microsoft is transphobic
View GitHub Profile
@yottatsa
yottatsa / test.log
Created December 24, 2018 15:51
Testing 50pus6272/05 with new PR
$ python -m haphilipsjs --debug --host 192.168.1.6 --api 6
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.6:1925
DEBUG:urllib3.connectionpool:http://192.168.1.6:1925 "GET /6/system HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Resetting dropped connection: 192.168.1.6
DEBUG:urllib3.connectionpool:http://192.168.1.6:1925 "GET /6/audio/volume HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Resetting dropped connection: 192.168.1.6
DEBUG:urllib3.connectionpool:http://192.168.1.6:1925 "GET /6/channeldb/tv HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Resetting dropped connection: 192.168.1.6
DEBUG:urllib3.connectionpool:http://192.168.1.6:1925 "GET /6/channeldb/tv/channelLists/allcab HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Resetting dropped connection: 192.168.1.6
@yottatsa
yottatsa / test.log
Created December 24, 2018 16:46
Testing 50pus6272/05 with new PR Raw
(venv) homeassistant@home:~ $ python -m haphilipsjs --debug --host 192.168.1.6 --api 6
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.6:1925
DEBUG:urllib3.connectionpool:http://192.168.1.6:1925 "GET /6/system HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Resetting dropped connection: 192.168.1.6
DEBUG:urllib3.connectionpool:http://192.168.1.6:1925 "GET /6/audio/volume HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Resetting dropped connection: 192.168.1.6
DEBUG:urllib3.connectionpool:http://192.168.1.6:1925 "GET /6/channeldb/tv HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Resetting dropped connection: 192.168.1.6
DEBUG:urllib3.connectionpool:http://192.168.1.6:1925 "GET /6/channeldb/tv/channelLists/allcab HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Resetting dropped connection: 192.168.1.6
@yottatsa
yottatsa / gist:fa92ce1e6157f7ebefd067f3dc82a9ed
Created January 30, 2019 15:07
TZ breakage in Home Assistant
Jan 30 04:04:34 home hass[17791]: return dt.datetime.now(UTC)
Jan 30 04:04:34 home hass[17791]: TypeError: tzinfo argument must be None or of a tzinfo subclass, not type 'v0p�v0p�v'
@yottatsa
yottatsa / sdnotify.py
Created January 30, 2019 16:45
systemd Service Notification for home assistant
import os
import logging
from datetime import timedelta
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.util import Throttle
REQUIREMENTS = ["sdnotify"]
@yottatsa
yottatsa / cutpdf.sh
Created April 20, 2020 23:34
Cutting PDF pages in half
#!/bin/bash -eux
# Based on https://superuser.com/questions/235074/how-can-i-split-a-pdfs-pages-down-the-middle
sizes () {
pdfinfo -box "${1}" -f 1 -l -1 | grep MediaBox
}
biggest () {
awk '{print $4,$5,$6,$7}' $@ | sort | uniq | sort -n -k 1 -k 2 -k 3 -k 4 -t ' ' -r | head -n1

Keybase proof

I hereby claim:

  • I am yottatsa on github.
  • I am atsukoito (https://keybase.io/atsukoito) on keybase.
  • I have a public key ASAWhjMc9kARFIPzpL5vkqc_hG_FfiEG-5EheiSzps_2wgo

To claim this, I am signing this object:

@yottatsa
yottatsa / etherjet.bin.txt
Last active December 6, 2021 15:10
Zilog Z16M2720ASC OY flags decoded
00h: ICR0.EN_ATA_BHE|EN_CTR_IRQ|EN_RDY_BSY|EN_OVERIDE3 (ICR0.EN_RDY_BSY|EN_OVERIDE3|CLOCK_IN|CLOCK1|CLOCK0)
01h: IER.EN_INPACK (IER.UNSET)
02h: ICR1.UNSET
03h: ICR2._R7|EN_INVERT_ATRST|EN_ATT_MODE|EN_INDP_MODE (ICR2.PCMCIA_IO8)
04h: ICR3.UNSET
05h: CCRBaseAddress.EN_CRR_A10 (CCRBaseAddress.CCR_BASE_0000)
06h: 00h
07h: 00h
08h: 00h
09h: 00h
#!/bin/bash
# fixes make && auto** && gcc-3.3 build process
#
# $(srcdir)/treelang/parse.c $(srcdir)/treelang/parse.h: $(srcdir)/treelang/parse.y
# $(BISON) $(BISONFLAGS) -v $(srcdir)/treelang/parse.y\
# --output=$(srcdir)/treelang/parse.c --defines
#
# https://www.gnu.org/software/make/manual/html_node/Splitting-Recipe-Lines.html#Splitting-Recipe-Lines
FARG=$(echo -- $* | grep -o -- '-f *[^ ]*')
@yottatsa
yottatsa / qt_v4.8.7_config.sh
Created May 23, 2022 20:37
How to configure Qt 4.8.7 on GCC 7 on modern Ubuntu
CXXFLAGS='-fpermissive' CFLAGS='-fpermissive' \
OPENSSL_LIBS='-I/opt/amd/ssl/include -L/opt/amd/ssl/lib -lssl -lcrypto' \
CC=gcc-7 CXX=g++-7 \
../qt/configure -opensource -confirm-license -release -shared -fast \
-nomake docs -nomake demos -nomake examples -nomake tests \
-no-cups -no-webkit -no-qt3support -xmlpatterns -no-javascript-jit -no-script \
-no-scripttools -no-libtiff -system-sqlite -no-accessibility \
-prefix /opt/amd/qt -openssl-linked -I/opt/amd/ssl/include -L/opt/amd/ssl/lib
@yottatsa
yottatsa / run.sh
Created May 26, 2022 21:51
Some Macintosh Classic emulation
#!/bin/sh
cd "$(dirname "${0}")"
export QEMU_BIN=./qemu-system-m68k_946744d34d60e88cf53cb123556fa16830c7042d
exec ./run8 \
-device scsi-hd,scsi-id=2,drive=hd2,vendor="SEAGATE",product="ST225N",ver="1.0" \
-drive file=netbsd.raw,media=disk,format=raw,if=none,id=hd2 \
-device scsi-hd,scsi-id=4,drive=hd4,vendor="SEAGATE",product="ST225N",ver="1.0" \
-drive file=data.raw,media=disk,format=raw,if=none,id=hd4 \
-device scsi-hd,scsi-id=5,drive=hd5,vendor="SEAGATE",product="ST225N",ver="1.0" \