会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Loading
Loading
灰色的修饰
首页
新随笔
联系
订阅
管理
2022年9月4日
Git设置代理
摘要: 有时会国内会因为github克隆速度非常慢,中途各种错误断开造成克隆项目失败,可以尝试设置代理解决 设置代理 1.http || https协议 //设置全局代理 //http git config --global https.proxy http://127.0.0.1:1080 //https
阅读全文
posted @ 2022-09-04 23:51 灰色的修饰
阅读(188)
评论(0)
推荐(0)
2022年8月4日
通过SSH实现内网穿透和端口转发功能
摘要: 本地端口转发 -L 本地端口转发 命令:ssh -N -L [本地ip]:[本地端口]:[远程ip]:[远程端口] 远程服务器 本地ip可以省略不写 例如:ssh -N -L 3012:127.0.0.1:2220 root@abc.com 含义:把本机的3012映射到远程服务器的2220端口上。本
阅读全文
posted @ 2022-08-04 12:59 灰色的修饰
阅读(2617)
评论(0)
推荐(0)
2022年6月22日
输入框手机号分割
摘要: const ipt = document.querySelector('#ipt') ipt.oninput = (e) => { const v = (e.target.value + '').replace(/\D/g, '') const r = v.replace(/^(\d{3})/, '
阅读全文
posted @ 2022-06-22 00:17 灰色的修饰
阅读(48)
评论(0)
推荐(0)
封装一个带动画的输入框
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> body { background: #f5f5fe; } .container { width: 400px; margin: 150px au
阅读全文
posted @ 2022-06-22 00:14 灰色的修饰
阅读(36)
评论(0)
推荐(0)
2022年6月14日
基于原生JS封装请求拦截器
摘要: 封装XMLHttpRequest对象拦截方法 function proxyRequest() { const _xhr = window.XMLHttpRequest; const proxies = []; const events = {}; const cache = { _this: nul
阅读全文
posted @ 2022-06-14 22:25 灰色的修饰
阅读(1024)
评论(0)
推荐(1)
2021年12月12日
JavaScript的严格模式
摘要: 严格模式是ES5提出的概念。它以更严格的方式去检查代码的错误。它可以全局使用,可以在函数内部局部使用。 要开启严格模式,只需要在代码前面加上"use strict" 即可。 严格模式有以下限制: 变量必须声明后再使用 函数的参数不能有同名属性,否则报错 不能使用with语句 不能对只读属性赋值,否则
阅读全文
posted @ 2021-12-12 23:50 灰色的修饰
阅读(55)
评论(0)
推荐(0)
2021年11月18日
Git常用操作汇总
摘要: 本地分支关联远程分支 有对应远程分支,把当前所在分支关联到远程分支。 git push --set-upstream <远程仓库> <远程分支> git push --set-upstream myOrigin test 把本地某个分支关联到远程某个分支。 git branch --set-upst
阅读全文
posted @ 2021-11-18 13:37 灰色的修饰
阅读(69)
评论(0)
推荐(0)
2021年9月1日
纯JS实现跨域发送请求
摘要: function fetch(opts) { const ifm = document.createElement('iframe') const script = document.createElement('script') const js = ` document.domain = win
阅读全文
posted @ 2021-09-01 18:07 灰色的修饰
阅读(280)
评论(0)
推荐(0)
2021年6月18日
nvm for Mac 安装及使用教程
摘要: nvm 是Node.js 的版本管理工具,可以在同一台电脑上安装多个Node.js版本灵活切换。 安装 sudo curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash 其中0.39.0可以替换为
阅读全文
posted @ 2021-06-18 13:10 灰色的修饰
阅读(12869)
评论(0)
推荐(0)
2021年1月1日
Java的常用API
摘要: Scanner 获取键盘输入内容 package api.demo; // 1.导包 import java.util.Scanner; public class demo1 { public static void main(String[] args) { // 2.创建 // 备注: Syst
阅读全文
posted @ 2021-01-01 19:52 灰色的修饰
阅读(764)
评论(0)
推荐(0)
下一页