Skip to content

Instantly share code, notes, and snippets.

View tjunussov's full-sized avatar

Tim TJey Jun tjunussov

View GitHub Profile
@tjunussov
tjunussov / smbproxy.md
Created April 23, 2020 07:52
SMB Proxy on Windows via SSH Tunner

launch hdwwiz.exe network adapters -> Microsoft KM-TEST Loopback Adapter -> finish

!Important disable everything except ipv4 in that new network sink inside the ipv4 settings set up a ip, 255.255.255.255 as subnet mask and disable netbios

if you cannot decide on an ip simply use 192.168.2.123. sadly it's impossible to use 127.0.0.2 or similar for this. windows for some unknown reason will not connect to it. elevated windows shell

#Containers IP Addresses
docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
#hass runtime
vi /var/run/s6/services/home-assistant/run
exec python3 -m homeassistant --config /config --verbose --debug --log-rotate-days 1 --log-file /var/log/homeassistant.log
hass -h
usage: hass [-h] [--version] [-c path_to_config_dir] [--demo-mode] [--debug]
[--open-ui] [--skip-pip] [-v] [--pid-file path_to_pid_file]
[--log-rotate-days LOG_ROTATE_DAYS] [--log-file LOG_FILE]
[--log-no-color] [--runner] [--script ...] [--daemon]
cd /usr/local/lib/python3.7/site-packages/

Using SSH to set up a VPN

If you're a roaming user or you're trying to link a satellite office to the main network, SSH can handle the job. Other solutions exist, and SSH isn't perfect, but this is probably the simplest trick out there.

OpenSSH since version 4.3 has the ability to set up TUN/TAP tunnels. I'm sure most of you have set up port-forwarding via SSH, but this is a little

# ESP32 POTP (Portable Google Authenticator)
**[status: in developing]**
Portable EAP Protected One-Time Password (EAP-POTP) or GoogleAuthenticator hardware for provides two-factor user authentication. This is a
PlatformIO DIY project for WeMOS like board with ESP32 and OLED SSD1306 display, see materials and instructions below. <a href="https://github.com/hpsaturn/esp32_wemos_oled/blob/master/assets/esp32_potp_intro.jpg"><img src="https://github.com/hpsaturn/esp32_wemos_oled/blob/master/assets/esp32_potp_intro.jpg" align="right" height="512" width="512" ></a>
## Development Status:
1 Install USB 2 UART drivers
https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
Neopixel D4 output must be specified exactly as D4 npt just 4
#define PIN D4
# Double Remote Repositories
git remote set-url --add --push origin [email protected]:tjunussov/uyi.dashboard.git
# Git Add,Commit,Push shourtcut
git acp "Message"
# Git ignore file update
git rm -r --cached .
firewall-cmd --zone=public --permanent --add-masquerade
firewall-cmd --zone=external --permanent --add-masquerade
firewall-cmd --zone=public --query-masquerade
firewall-cmd --zone=internal --add-masquerade --permanent
firewall-cmd --zone=public --add-forward-port=port=6554:proto=udp:toport=554:toaddr=10.0.2.60 --permanent
firewall-cmd --reload
firewall-cmd --permanent --zone=public --add-port=6555/tcp
firewall-cmd --list-all --zone=public
@tjunussov
tjunussov / RPI Network interfaces
Last active November 3, 2018 11:01
Rapberry Pi Network Static dual IT Address
##sudo iwlist wlan0 scan
##
nano /etc/network/interfaces
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp