首页
关于
Search
1
git lg彩色显示日志
28 阅读
2
在 Ubuntu 22.04 LTS 中安装 Docker
19 阅读
3
CentOs/Ubuntu搭建上网x-ui
18 阅读
4
git使用多个源和多个分支
15 阅读
5
清理Windows臃肿程序
15 阅读
默认分类
网站搭建
Windows
Linux
Docker
OpenWrt
Hackintosh
Git
Python
Web开发
JavaScript
FFmpeg
Demo
工具
刷机
油猴脚本
Excel
Chrome Extension
登录
Search
标签搜索
Pandas
读取
时区
Chrome
centos8
求和
Nginx
Typecho
404
csv
国际站
询盘导出
油猴脚本
bbr
Ubuntu
远程桌面
日志
log
数据清洗
打印机
野生程序猿
累计撰写
153
篇文章
累计收到
0
条评论
首页
栏目
默认分类
网站搭建
Windows
Linux
Docker
OpenWrt
Hackintosh
Git
Python
Web开发
JavaScript
FFmpeg
Demo
工具
刷机
油猴脚本
Excel
Chrome Extension
页面
关于
搜索到
153
篇与
的结果
2023-04-16
一个切换ip的脚本
macOS设置为DHCP#!/bin/bash echo 设置网络Wi-Fi为固定DHCP sudo networksetup -setdhcp Wi-Fi sudo networksetup -setdnsservers Wi-Fi "Empty" echo "已将网络接口 en1 设置为使用 DHCP。" 设置为固定IP#!/bin/bash echo 设置网络Wi-Fi为固定ip(ChatGPT) sudo networksetup -setmanual "Wi-Fi" 192.168.123.52 255.255.255.0 192.168.123.22 sudo networksetup -setdnsservers "Wi-Fi" 192.168.123.22Windows设置为DHCP@echo off chcp 65001 setlocal EnableDelayedExpansion set "connection_name=以太网" set "ip_address=" set "gateway_address=" for /f "tokens=2 delims=:" %%f in ('netsh interface ip show address "%connection_name%" ^| findstr /c:"IP Address"') do set "ip_address=%%f" for /f "tokens=2 delims=:" %%b in ('netsh interface ip show address "%connection_name%" ^| findstr /c:"Default Gateway"') do set "gateway_address=%%b" set "ip_address=!ip_address: =!" set "gateway_address=!gateway_address: =!" echo 原%connection_name% 的 IP 地址是 %ip_address% echo 原%connection_name% 的 网关地址是 %gateway_address% netsh interface ipv4 set address "%connection_name%" static %ip_address% 255.255.255.0 192.168.0.50 netsh interface ipv4 set dns "%connection_name%" static 192.168.0.50 timeout /t 3 for /f "tokens=2 delims=:" %%a in ('netsh interface ipv4 show addresses "%connection_name%" ^| findstr /r /c:"IP Address.*:"') do ( set "ip_address=%%a" set "ip_address=!ip_address: =!" ) for /f "tokens=2 delims=:" %%b in ('netsh interface ipv4 show config "%connection_name%" ^| findstr /r /c:"Default Gateway.*:"') do ( set "gateway_address=%%b" set "gateway_address=!gateway_address: =!" ) echo 设置后IP地址是: %ip_address% echo 设置后网关地址是: %gateway_address% endlocal echo ===================== echo 设置完毕,3秒后将自动关闭窗口。 timeout /t 3 设置为固定IP@echo off chcp 65001 setlocal EnableDelayedExpansion set "connection_name=以太网" set "ip_address=" REM 将本机IP地址和DNS设置为自动获取 netsh interface ipv4 set address "%connection_name%" dhcp netsh interface ipv4 set dnsservers "%connection_name%" dhcp echo IP地址和DNS设置为自动获取。 timeout /t 3 for /f "tokens=2 delims=:" %%a in ('netsh interface ipv4 show addresses "%connection_name%" ^| findstr /r /c:"IP Address.*:"') do ( set "ip_address=%%a" set "ip_address=!ip_address: =!" ) for /f "tokens=2 delims=:" %%b in ('netsh interface ipv4 show config "%connection_name%" ^| findstr /r /c:"Default Gateway.*:"') do ( set "gateway_address=%%b" set "gateway_address=!gateway_address: =!" ) echo 设置后IP地址是: %ip_address% echo 设置后网关地址是: %gateway_address% endlocal echo ===================== echo 设置完毕,3秒后将自动关闭窗口。 timeout /t 3
2023年04月16日
2 阅读
0 评论
0 点赞
2023-04-12
一个模仿Telegram的密码输入框
实现步骤首先,在 HTML 代码中,使用了 input 标签和 type 属性将输入框定义为 password 类型:<input type="password" id="password-input" class="password-input" placeholder=" ">然后,使用 CSS 定义了输入框的样式,包括宽度、高度、内边距、字体大小、边框、边框半径、背景色和字体颜色等:.password-input { width: 100%; height: 50px; padding: 10px; font-size: 16px; border: 1px solid #ccc; border-radius: 10px; background-color: #fff; color: #333; }为了在输入框中显示提示文本,使用了 placeholder 属性。同时,使用了伪类 ::placeholder 来定义提示文本的样式,包括字体大小和颜色:.password-input::placeholder { color: #999; font-size: 16px; }为了在用户输入密码时向上移动输入框的标签,并在输入框获得焦点时改变输入框边框的颜色,使用了以下 CSS:.password-input:focus, .password-input:not(:placeholder-shown) { outline: none; border: 2px solid rgb(51,144,236); } .password-input:focus + label, .password-input:not(:placeholder-shown) + label { font-size: 12px; top: -8px; left: 8px; color: rgb(51,144,236); }最后,在 JavaScript 中,通过获取输入框的值并将其显示在警告框中来实现提交功能。此外,还使用了事件监听器来实现显示密码按钮的功能:const passwordInput = document.getElementById("password-input"); const togglePassword = document.getElementById("toggle-password"); const button = document.querySelector(".show-button"); togglePassword.addEventListener("click", function(event) { const type = passwordInput.getAttribute("type") === "password" ? "text" : "password"; passwordInput.setAttribute("type", type); togglePassword.classList.toggle("fa-eye"); togglePassword.classList.toggle("fa-eye-slash"); }); button.addEventListener("click", function(event) { alert("你输入的密码是:" + passwordInput.value); });通过使用 JavaScript 监听输入框中的输入事件,可以实现当用户开始输入密码时显示显示密码按钮和提交按钮的功能。这是通过在事件处理程序中检查输入框的值来实现的:passwordInput.addEventListener("input", function(event) { if (passwordInput.value !== "") { togglePassword.style.display = "block"; button.style.display = "block"; } else { togglePassword.style.display = "none"; button.style.display = "none"; } });这将根据输入框中的值来显示或隐藏按钮。当用户输入任何字符时,这将被视为输入框中已有值的信号,并显示按钮。如果输入框的值为空,则会隐藏按钮。完整代码<!DOCTYPE html> <html> <head> <title>输入密码</title> <style> * { box-sizing: border-box; } body { font-family: Arial, sans-serif; background-color: #ffffff; } h1 { text-align: center; margin-top: 50px; color: #333; } .input-box { position: relative; width: 300px; margin: 50px auto; } .password-input { width: 100%; height: 50px; padding: 10px; font-size: 16px; border: 1px solid #ccc; border-radius: 10px; background-color: #fff; color: #333; } .password-input::placeholder { color: #999; font-size: 16px; } .password-input:focus, .password-input:not(:placeholder-shown) { outline: none; border: 2px solid rgb(51,144,236); } .password-input:focus + label, .password-input:not(:placeholder-shown) + label { font-size: 12px; top: -8px; left: 8px; color: rgb(51,144,236); } label { position: absolute; top: 14px; left: 14px; font-size: 16px; color: #999; transition: all 0.3s; background-color: #ffffff; pointer-events: none; } .eye-icon { position: absolute; top: 16px; right: 15px; font-size: 16px; color: #999; cursor: pointer; } .show-button { position: absolute; color: white; bottom: -75px; right: 0px; width: 100%; height: 50px; background-color: rgb(51,144,236); border: none; border-radius: 10px; cursor: pointer; display: none; } .show-button:focus { outline: none; } .show-button:active { transform: translateY(2px); } .show-button i { color: #fff; font-size: 16px; } </style> </head> <body> <h1>请输入密码</h1> <div class="input-box"> <input type="password" id="password-input" class="password-input" placeholder=" "> <label for="password-input">输入密码</label> <i id="toggle-password" class="eye-icon fa fa-eye-slash" aria-hidden="true"></i> <button class="show-button" type="button" title="显示密码" tabindex="-1">下一步</button> </div> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <script> const passwordInput = document.getElementById("password-input"); const togglePassword = document.getElementById("toggle-password"); const button = document.querySelector(".show-button"); togglePassword.addEventListener("click", function(event) { const type = passwordInput.getAttribute("type") === "password" ? "text" : "password"; passwordInput.setAttribute("type", type); togglePassword.classList.toggle("fa-eye"); togglePassword.classList.toggle("fa-eye-slash"); }); passwordInput.addEventListener("input", function(event) { if (passwordInput.value !== "") { togglePassword.style.display = "block"; button.style.display = "block"; } else { togglePassword.style.display = "none"; button.style.display = "none"; } }); button.addEventListener("click", function(event) { alert("你输入的密码是:" + passwordInput.value); }); </script> </body> </html>
2023年04月12日
3 阅读
0 评论
0 点赞
2023-04-05
WebRTC泄漏真实IP
WebRTC会泄露你的真实IP如果通过浏览器插件switchOmega 将浏览器的代理配置为clash监听的socks5,能防止WebRTC泄露吗?答案是并不可以.虽然socks5支持代理UDP 插件中配置的也确实是socks5代理 但是 浏览器不支持将UDP流量交给socks5代理 Chrome Firefox Edge Safari这些主流的浏览器都不支持,但使用插件禁用浏览器的WebRTC功能开启了Tun模式 stun的数据 会被路由到clash的虚拟网卡, 选择代理这条UDP请求,于是使用你配置的节点信息 将数据加密 检测WebRTC的网站: https://browserleaks.com/webrtc
2023年04月05日
4 阅读
0 评论
0 点赞
2023-04-04
阿里云邮箱配置
网页版登录地址协议服务器地址服务器端口号(常规)服务器端口号(加密)POP3pop.qiye.aliyun.com110995IMAPimap.qiye.aliyun.com143993SMTPsmtp.qiye.aliyun.com25465
2023年04月04日
2 阅读
0 评论
0 点赞
2023-04-03
OpenWrt编译步骤
Lede项目地址 1.首先装好 Linux 系统,推荐 Debian 11 或 Ubuntu LTS2.安装编译依赖sudo apt update -y sudo apt full-upgrade -y sudo apt install -y ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip libpython3-dev qemu-utils \ rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev3.下载源代码,更新 feeds 并选择配置git clone https://github.com/coolsnowwolf/lede cd lede ./scripts/feeds update -a ./scripts/feeds install -a make menuconfig4.下载 dl 库,编译固件 (-j 后面是线程数,第一次编译推荐用单线程)make download -j8 make V=s -j1二次编译:cd lede git pull ./scripts/feeds update -a ./scripts/feeds install -a make defconfig make download -j8 make V=s -j$(nproc)如果需要重新配置:rm -rf ./tmp && rm -rf .config make menuconfig make V=s -j$(nproc)
2023年04月03日
2 阅读
0 评论
0 点赞
1
...
18
19
20
...
31