Skip to content

Instantly share code, notes, and snippets.

Avatar

Viktor Oreshkin stek29

View GitHub Profile
@stek29
stek29 / k8sint.go
Created Jun 11, 2022
decode kubernetes internal etcd encoding to YAMLs
View k8sint.go
package main
import (
"fmt"
"io/ioutil"
"os"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/apimachinery/pkg/runtime/serializer/json"
@stek29
stek29 / twauth.py
Created Jun 11, 2022
twitter oob ouath python3
View twauth.py
#!/usr/bin/env python
"""
requirements.txt:
certifi==2021.10.8
charset-normalizer==2.0.12
httplib2==0.20.4
idna==3.3
oauth2==1.9.0.post1
oauthlib==3.2.0
pyparsing==3.0.8
@stek29
stek29 / kube-apiserver-args.yaml
Created May 22, 2022
kube apiserver nginx http balancing poc
View kube-apiserver-args.yaml
- command:
- kube-apiserver
- --bind-address=127.0.1.1
- --requestheader-allowed-names=front-proxy-client
- --requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt
- --requestheader-extra-headers-prefix=X-Remote-Extra-
- --requestheader-group-headers=X-Remote-Group
- --requestheader-username-headers=X-Remote-User
- --secure-port=6443
- ... more args ...
View StartupDisk.applescript
do shell script "diskutil mount disk0s3"
tell application "System Events"
tell application "System Preferences"
set current pane to pane id "com.apple.preference.startupdisk"
activate
delay 1
end tell
tell application process "System Preferences"
@stek29
stek29 / 0webosbrew-letsencrypt-ca.md
Last active Jul 11, 2022
fix webOS ca certificates for DST Root X3 expiry (on rooted TVs)
View 0webosbrew-letsencrypt-ca.md

HowTo

  • Root via rootmy.tv
  • Install

Tested on webOS 4.5, should at least on webOS 3.5+

Installation/Update

curl -qs "https://gist.githubusercontent.com/stek29/761232c6f7e1ffbc36b98da2a3a0f4d9/raw/install.sh?$(date +%s)" | sh -
@stek29
stek29 / quine.swift
Created Oct 6, 2021
simple Quine program ¯\_(ツ)_/¯
View quine.swift
func quine() {
var s = """
func quine() {
var s = MEGIC
let slash = "\\\\"
let s1 = "\\n "
let s2 = "\\"\\"\\""
var sInd = s.replacingOccurrences(of: "\\n", with: s1)
sInd = sInd.replacingOccurrences(of: slash, with: slash + slash)
sInd = s2 + s1 + sInd + s1 + s2
@stek29
stek29 / kpms.nginx
Last active Oct 6, 2021
kpms msx http based api hack for older webOS devices - for LE root cert expiry workaround
View kpms.nginx
server {
listen 80;
server_name kp.local;
location = /msx/start.json {
proxy_pass https://kpms.cc;
proxy_http_version 1.1;
proxy_set_header Host "kpms.cc";
@stek29
stek29 / vacuum_manual_control.html
Created Aug 12, 2021
Valetudo manual control frontend
View vacuum_manual_control.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>Manual Control</title>
</head>
@stek29
stek29 / 0vacuum_rc_gamepad.md
Last active Aug 12, 2021
miot vacuum remote control with JS Gamepad API with analog input
View 0vacuum_rc_gamepad.md

start py server, open web in browser

@stek29
stek29 / dreame_1c_root.md
Last active Apr 10, 2022
Root Dreame Robot without via uart only
View dreame_1c_root.md

These are just my notes, and described process worked for me on my 1C robot
If anything goes wrong, having USB adapter for FEL flashing might be the only way to restore your robot
this is not an official guide
oh, and I'm not responsible for any damage blah blah
and huge thanks to Dennis and Hypfer, and everyone behind this root :)

0. get uboot shell

to enter uboot shell on 1C you have to: 0. turn robot off normally

  1. hook up uart, open console