All posts by 龙生
GitHub 访问不了?用这个方法轻松解决
https://news.51cto.com/art/202103/652739.htm首先,你需要复制以下内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# GitHub520 Host Start 185.199.108.154 github.githubassets.com 140.82.114.21 central.github.com 185.199.108.133 desktop.githubusercontent.com 185.199.108.153 assets-cdn.github.com 185.199.108.133 camo.githubusercontent.com 185.199.108.133 github.map.fastly.net 199.232.69.194 github.global.ssl.fastly.net 140.82.113.4 gist.github.com 185.199.108.153 github.io 140.82.114.3 github.com 140.82.113.5 api.github.com 185.199.108.133 raw.githubusercontent.com 185.199.108.133 user-images.githubusercontent.com 185.199.108.133 favicons.githubusercontent.com 185.199.108.133 avatars5.githubusercontent.com 185.199.108.133 avatars4.githubusercontent.com 185.199.108.133 avatars3.githubusercontent.com 185.199.108.133 avatars2.githubusercontent.com 185.199.108.133 avatars1.githubusercontent.com 185.199.108.133 avatars0.githubusercontent.com 185.199.108.133 avatars.githubusercontent.com 140.82.113.10 codeload.github.com 52.216.226.40 github-cloud.s3.amazonaws.com 52.216.162.99 github-com.s3.amazonaws.com 52.216.142.196 github-production-release-asset-2e65be.s3.amazonaws.com 52.217.97.236 github-production-user-asset-6210df.s3.amazonaws.com 52.217.194.41 github-production-repository-file-5c1aeb.s3.amazonaws.com 185.199.108.153 githubstatus.com 64.71.168.201 github.community 185.199.108.133 media.githubusercontent.com # Update time: 2021-03-24T16:06:33+08:00 # Star me GitHub url: https://github.com/521xueweihan/GitHub520 # GitHub520 Host End |
接着,你需要去修改 hosts 文件,hosts 文件在每个系统的位置不一,详情如下: Windows 系统:C:\Windows\System32\drivers\etc\hosts Linux 系统:/etc/hosts Mac(苹果电脑)系统:/etc/hosts Android(安卓)系统:/system/etc/hosts iPhone(iOS)系统:/etc/hosts 修改方法,把第一步的内容复制到文本末尾: Windows 使用记事本。 Linux、Mac 使用 Root 权限:sudo vi /etc/hosts。 iPhone、iPad 须越狱、Android 必须要 root。 大部分情况下是直接生效,如未生效可尝试下面的办法,刷新 DNS: Windows:在 CMD 窗口输入:ipconfig /flushdns Linux 命令:sudo rcnscd restart Mac 命令:sudo killall -HUP mDNSResponder 是不是觉得超级简单?目前,GitHub520已经在Github上标星 4.1K,累计分支 348 个(Github地址:https://github.com/521xueweihan/GitHub520) 如果你的Github在访问时也出现图裂、或者加载缓慢等问题,不妨试试。Github520,让你重新爱上Github。 from:https://www.cnblogs.com/rxbook/p/15241501.html
View Details如何让WORDPRESS不显示文章全部内容,只显示部分摘要
WordPress首页默认显示的是每篇文章的全部内容 ,发表文章的时候在首页面预览会显示文章的全部内容,很影响我们的阅读体验. 在wp-content\themes目录下,选择你自己安装模板,然后打开index.php,你会发现部分代码如下:
1 2 3 4 5 6 7 |
while ( have_posts() ) { the_post(); get_template_part( 'xxx', get_post_format() ); } |
index.php是调用xxx.php的文件用来输出文章的内容,你在模板目录下找到xxx.php,打开编辑它,找到这段代码:
1 |
the_content( __( 'Read more...', 'xxx' ) ); |
将该行代码注释掉,修改成:
1 2 3 4 5 6 7 8 9 |
if(!is_single()) { the_excerpt(); } else { the_content(__('(more…)')); } |
from:https://www.cnblogs.com/lionli/p/11944963.html
View Detailsvue项目中在单独的js文件中使用element ui
vue项目中在单独的js文件中使用element ui 例如要使用MessageBox组件 例如要使用MessageBox组件 1.引入组件 import { MessageBox } from "element-ui"; 2.使用 MessageBox.confirm("这是一个内容", "这是一个标题" ,{undefined distinguishCancelAndClose: true, confirmButtonText: ‘确认’, showClose:false, showCancelButton:false }).then(()=>{undefined // 点击确认按钮的回调 }) 一般是在响应拦截器中使用,亲测有效 ———————————————— 版权声明:本文为CSDN博主「流年*痕迹」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/qq_52007839/article/details/111663753
View Details干货:详解asp.net Core3.0区域与路由配置的方法
在ASP.NET Core 3.0中路由配置和2.0不一样了 一、MVC 服务注册 ASP.NET Core 3.0 添加了用于注册内部的 MVC 方案的新选项Startup.ConfigureServices。 三个新的顶级扩展方法与 MVC 方案上IServiceCollection可用。 模板使用这些新方法,而不是UseMvc。 但是,AddMvc继续像它已在以前的版本。 下面的示例将添加对控制器和与 API 相关的功能,但不是视图或页面的支持。 API 模板使用此代码:
1 2 3 4 |
public void ConfigureServices(IServiceCollection services) { services.AddControllers(); } |
下面的示例将添加对控制器、 与 API 相关的功能,和视图,但不是页面的支持。 Web 应用程序 (MVC) 模板使用此代码:
1 2 3 4 |
public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); } |
下面的示例添加支持 Razor 页面和最小控制器支持。 Web 应用程序模板使用此代码:
1 2 3 4 |
public void ConfigureServices(IServiceCollection services) { services.AddRazorPages(); } |
此外可以组合的新方法。 下面的示例是等效于调用AddMvcASP.NET Core 2.2 中:
1 2 3 4 5 |
public void ConfigureServices(IServiceCollection services) { services.AddControllers(); services.AddRazorPages(); } |
二、Startup.Configure配置 一般不建议: 添加UseRouting。 如果该应用程序调用UseStaticFiles,将置于UseStaticFiles之前 UseRouting。 如果应用使用身份验证/授权功能,如AuthorizePage或[Authorize],将对UseAuthentication并UseAuthorization后 UseRouting。 如果应用使用CORS功能,如[EnableCors],将放置UseCors下一步。 替换UseMvc或UseSignalR与UseEndpoints。 以下是一种Startup.Configure典型的 ASP.NET Core 2.2 应用中:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
public void Configure(IApplicationBuilder app) { ... app.UseStaticFiles(); app.UseAuthentication(); app.UseSignalR(hubs => { hubs.MapHub<ChatHub>("/chat"); }); app.UseMvc(routes => { routes.MapRoute("default", "{controller=Home}/{action=Index}/{id?}"); }); } |
现在的控制器映射内发生UseEndpoints。 添加MapControllers如果应用使用属性路由。 由于路由包括对许多框架在 ASP.NET Core 3.0 或更高版本的支持,添加属性路由的控制器是参加。 将为以下内容: MapRoute 使用 MapControllerRoute MapAreaRoute 使用 MapAreaControllerRoute 由于路由现在包括对不止是 MVC 的支持,已更改了术语进行明确说明他们所做的这些方法。 如传统路由MapControllerRoute / MapAreaControllerRoute / MapDefaultControllerRoute它们要添加的顺序应用。 将第一位更具体的路由 (如某一区域的路由)。 如下示例中: […]
View DetailsVirtualBox打开虚拟电脑提示Call to NEMR0InitVMPart2 failed: VERR_NEM_INIT_FAILED (VERR_NEM_VM_CREATE_FAILED)
不能为虚拟电脑 CentOS7a 打开一个新任务. Call to NEMR0InitVMPart2 failed: VERR_NEM_INIT_FAILED (VERR_NEM_VM_CREATE_FAILED).
1 2 3 |
返回 代码: E_FAIL (0x80004005) 组件: ConsoleWrap 界面: IConsole {872da645-4a9b-1727-bee2-5585105b9eed} |
解决方案:禁用Hyper-V 以管理员身份运行cmd输入
1 |
bcdedit /set hypervisorlaunchtype off |
重启电脑 ———————————————— 版权声明:本文为CSDN博主「1home」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/weixin_45673166/article/details/120982710
View Detailsinput [type=search] 搜索框去掉默认边框和旁边的小图标
input[type="search"]{-webkit-appearance:none;} input::-webkit-search-cancel-button {display: none;} http://www.html-5.cn/WebApp/css/10243.html ———————————————— 版权声明:本文为CSDN博主「LYC_2011_ACM」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/LYC_2011_ACM/article/details/9149071
View DetailsLinux zip打包排除某个目录或只打包某个目录
需求:zip打包某个目录但是要排除目录下某个文件或者某个目录。
1 |
zip -r server.zip server.geng.com/ -x './server.geng.com/Upload/*' |
-x参数后加要排除的文件或目录的完整路径。注意引号不可少。 需求:zip打包只打包某个目录下单个目录(其实这个有点多余,直接打包这个目录就是了,应用的场景就是能保留目录树)
1 |
zip -r server.zip server.geng.com/ -i './server.geng.com/Upload/*' |
-i参数后加要打包的文件或目录的完整路径。注意引号不可少。 补充zip的相关参数:
1 2 3 4 5 6 7 8 |
-r 递归压缩,将指定目录下的所有文件以及子目录全部压缩 -d 从压缩文件内删除指定的文件 -i “文件列表” 只压缩文件列表中的文件 -x “文件列表” 压缩时排除文件列表中指定的文件 -u 更新文件到压缩文件中 -m 将文件加入压缩文件压缩后,删除原始文件,zhidao即把文件移到压缩文件中 -F 尝试修复损坏的压缩文件 -T 检查压缩文件内的每个文件是否正确无误 |
from:https://www.cnblogs.com/yuanwanli/p/12771220.html
View Detailsvim命令替换操作
替换当前行第一个 vivian为sky
1 |
:s/vivian/sky/ |
替换当前行所有 vivian为sky
1 |
:s/vivian/sky/g |
替换第 n 行开始到最后一行中,每一行的第一个vivian为sky
1 |
:n,$s/vivian/sky/ |
替换第 n 行开始到最后一行中,每一行所有vivian为sky n为数字,若n为.,表示从当前行开始到最后一行
1 |
:n,$s/vivian/sky/g |
替换每一行的第一个vivian为sky(等同于 :g/vivian/s//sky/)
1 |
:%s/vivian/sky/ |
替换每一行中所有 vivian为sky(等同于 :g/vivian/s//sky/g)
1 |
:%s/vivian/sky/g |
from:https://www.cnblogs.com/configure/p/10233565.html
View DetailsVue解决报错8_打包时TyeError: Class extends value undefined is not a constructor or null
一、问题描述 执行 npm run build:prod
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
ERROR TypeError: Class extends value undefined is not a constructor or null TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous> (C:\Users\司超龙\IdeaProjects\vue\base_education_vue\base_education_third_3.0+\grass-roots teaching system\node_modules\mini-css-extract-plugin\dist\CssDependency.js:12:46) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object.<anonymous> (C:\Users\司超龙\IdeaProjects\vue\base_education_vue\base_education_third_3.0+\grass-roots teaching system\node_modules\mini-css-extract-plugin\dist\index.js:12:45) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! vue-admin-template@4.4.0 build:prod: `vue-cli-service build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the vue-admin-template@4.4.0 build:prod script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\司超龙\AppData\Roaming\npm-cache\_logs\2021-03-26T13_04_34_482Z-debug.log |
执行num run build:prod 报错,但是npm run dev没问题 二、解决 TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous> (C:\Users\司超龙\IdeaProjects\vue\base_education_vue\base_education_third_3.0+\grass-roots teaching system\node_modules\mini-css-extract-plugin\dist\CssDependency.js:12:46) CssDependency的问题,依赖包不兼容 执行npm add webpack@4.5.0,解决 from:https://blog.csdn.net/qq_24654501/article/details/115254960
View Detailsdocker logs 查看实时日志
docker logs -f -t --since="2017-05-31" --tail=10 edu_web_1 --since : 此参数指定了输出日志开始日期,即只输出指定日期之后的日志。 -f : 查看实时日志 -t : 查看日志产生的日期 -tail=10 : 查看最后的10条日志。 edu_web_1 : 容器名称 from:https://www.cnblogs.com/qufanblog/p/6927411.html
View Details