-
Disable firewall for WSL vEthernet so that the Windows
adb
binary can communicate with the Linuxadb
package and start theadb
server on Windows side.Set-NetFirewallProfile -DisabledInterfaceAliases "vEthernet (WSL)" adb -a -P 5037 nodaemon server
-
Connect to the
adb
server on Windows from WSL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Git clone all my gists | |
import json | |
import urllib | |
from subprocess import call | |
from urllib import urlopen | |
import os | |
USER = os.environ['USER'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------ | |
# Image-Builder Procedure for OpenWRT - LEDE (In this case using Debian x64 NetInstall virtual machine) | |
# ------------------------------------------------------------------------ | |
su | |
apt-get update # Optional, make and upgrade too in case it has too many old pakackes. | |
apt-get install make aria2 screen ncftp -y | |
screen - | |
cd ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is done by luci (it just sets defaults and assigns an ID to each vlan entry) | |
uci set network.@switch[0].mirror_source_port='0' | |
uci set network.@switch[0].mirror_monitor_port='0' | |
uci set network.@switch_vlan[0].vid='1' | |
uci set network.@switch_vlan[1].vid='2' | |
# For tl-wr1043nd-v2: | |
# Switch, LAN (on tl-wr1043nd-v2 we must enable tagging on CPU port 0) | |
uci set network.@switch_vlan[0].ports='0t 1 2 3 4' # previously '0 1 2 3 4' | |
# Switch, WAN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Client Bridged / Client Mode / RelayD and IGMPProxy (It works) | |
# RelayD is to redirect packages and IGMP is for redirect IGMP packages | |
# Our network is 192.168.1.0/24 | |
# Steps: | |
# Configure WAN as static | |
# We should edit our wan iface and put static IP | |
uci set network.wan='interface' | |
uci set network.wan.proto='static' | |
uci set network.wan.ipaddr='192.168.1.239' # Main Network IP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ==================================================================================== | |
# Steps for Main Router (must have connected internet on WAN port) | |
# ==================================================================================== | |
# Set your network IP address configuration default is 192.168.1.0/24 | |
uci set network.lan.ipaddr='192.168.1.1' | |
# Recommended, to identify on network and when logged on | |
uci set system.@system[0].hostname='MainRouter' | |
uci set network.lan.hostname="`uci get system.@system[0].hostname`" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is to use on image building process to make TP-Link have autoconfigured with factory SSID and KEY | |
mkdir ./files/etc/uci-defaults/ | |
cat <<'__EOF__' > ./files/etc/uci-defaults/99_default-no-eth.sh | |
#!/bin/sh | |
[ "$(uci -q get system.@system[0].init)" = "" ] && exit 0 | |
[ -e /etc/init ] && exit 0 | |
touch /etc/init | |
uci batch <<EOC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ======================================================== | |
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE | |
# ======================================================== | |
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces) | |
uci set network.lan.type='bridge' | |
# assign WAN physical interface to LAN (will be available as an additional LAN port now) | |
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)" | |
uci del network.wan.ifname | |
# Remove wan logical interface, since we will not need it. | |
uci del network.wan |
- Extract the nginx to a location. example
C:\nginx
- Extract the PHP for Windows into nginx folder. example
C:\nginx\php