Ubuntu 18.04 apt-get更换为国内阿里云源

1、进入root模式 su root 2、备份sources.list cp /etc/apt/sources.list /etc/apt/sources.list_backup 3、更改源为国内阿里云源 vi /etc/apt/sources.list # Aliyun deb-src http://archive.ubuntu.com/ubuntu bionic main restricted #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ bionic universe deb http://mirrors.aliyun.com/ubuntu/ bionic-updates universe deb http://mirrors.aliyun.com/ubuntu/ bionic multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse #Added by software-properties deb http://archive.canonical.com/ubuntu bionic partner deb-src http://archive.canonical.com/ubuntu bionic partner deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted multiverse universe #Added by……

阅读全文

golang字符串去除空格和换行符

package main import ( "fmt" "strings" ) func main() { str := "welcome to cn\nbattle\n.com" // 去除空格 str = strings.Replace(str, " ", "", -1) // 去除换行符 str = strings.Replace(str, "\n", "", -1) fmt.Println(str) }……

阅读全文

vagrant 本地添加box 支持带版本号

一般处理方案 vagrant box add boxName ./downloadBoxName.box boxName 添加之后的box 名称 ./downloadBoxName.box 下载到本地的box 正常这样基本上就可以将box添加上去了。不过,这样添加的box版本号是0,大部分场景版本号影响也不大。但我在使用Laravel Homestead的时候,这边会有版本等一些限制。所以,我们如果能加上版本号是不是会更好一……

阅读全文

phpoffice/phpspreadsheet生成excel,浏览器下载excel表格方法

composer 安装 phpoffice/phpspreadsheet // 引入 namespace use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; // 创建 $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet(); // 设置文件名 $fileName = 'cnbattle.xlsx'; // 设置表格数据,当前为循环设置 1000行,25列的数据 $hang = 1000; $lei = 26; for ($x = 0; $x < $lei; $x++) { if ($lei>26){ die('$lei不能大于26'); } $leiStr = chr(65 + $x); for ($i = 1; $i <= $hang; $i++) { $sheet->setCellValue($leiStr . $i, 'value-' . $leiStr . $i); } } //告诉浏览器输出07Exc……

阅读全文

各操作系统的 SSR 客户端地址

平台链接备注 LinuxLinux 客户端一键安装配置使用脚本命令行界面, Mac 也能用,使用方法见注释 Terminaltsocks安装使用教程 WindowsSSR C# 版Windows 推荐使用 Android Android 客户端无 macOSShadowsocksX-NGMac 也能用 Linux 版的 iOS只有中国 App Store 帐号, 美区 App Store 只有中国区 App Store的话会麻烦一些……

阅读全文

[转载]Golang新手可能会踩的50个坑

前言 Go 是一门简单有趣的编程语言,与其他语言一样,在使用时不免会遇到很多坑,不过它们大多不是 Go 本身的设计缺陷。如果你刚从其他语言转到 Go,那这篇文章里的坑多半会踩到。 如果花时间学习官方 doc、wiki、讨论邮件列表、 Rob Pike 的大量文章以及 Go 的源码,会发现这篇文章中的坑是很常见的,新手跳……

阅读全文

阿里dns Let's Encrypt泛域名通配符SSL证书申请

安装acme.sh curl https://get.acme.sh | sh 申请阿里云 accesskey 在此页面申请: https://ak-console.aliyun.com/#/accesskey 开始申请 [root@VM_0_16_centos ~]# export Ali_Key="xxxxxx" // 填写你的key [root@VM_0_16_centos ~]# export Ali_Secret="xxxxxxxxxx" //填写你的 Secret [root@VM_0_16_centos ~]# acme.sh --issue --dns dns_ali -d cnbattle.com -d *.cnbattle.com // 填写你的阿里云下的域名,多个用 `-d` 继续添加即可 成功,显示如下信息就是成功了,可以去部署了,注意不要只有在Apache或Nginx内引用该文件,该文件可能……

阅读全文

Git修改commit的作者信息

全新克隆你的GIT仓库 git clone --bare https://github.com/user/repo.git cd repo.git 修改以下脚本中OLD_EMAIL,CORRECT_NAME ,CORRECT_EMAIL,对应的信息,复制粘贴此脚本,然后按下enter键来运行 #!/bin/sh git filter-branch --env-filter ' OLD_EMAIL="[email protected]" CORRECT_NAME="Your Correct Name" CORRECT_EMAIL="[email protected]" if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] then export GIT_COMMITTER_NAME="$CORRECT_NAME" export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" fi if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] then export GIT_AUTHOR_NAME="$CORRECT_NAME" export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL" fi ' --tag-name-filter cat -- --branches --tags 将修改后的仓库历史推到远……

阅读全文

2018.03.28-04.13 阿里云推荐好友送服务器

推荐有礼 推荐者 新老用户均可 推荐成功 即送最长5年 云服务器 1核 2G 1M带宽 40G SSD硬盘 推荐首位新用户,即送3个月云服务器 推荐新客越多,所获时长越长 参与者 限新用户 ¥99/年超值优惠购 云服务器 1核 2G 1M带宽 40G SSD硬盘 可享最低¥7.8/月特惠价 ¥99元/年,¥189/2年,¥279年/3年……

阅读全文

最近文章

分类

标签

ADB CSS Chrome DNS Docker FreeBSD Git Go Golang K8S Laravel Linux Lumen MySQL Nginx PHP PowerISO RSS订阅 ThinkPHP ubuntu Windows acme.sh adminer amis android anyproxy argo-cd canal ceph codeigniter codex coredns crontab cryptomator dapr dbeaver eclipse electron etcd fastboot ffmpeg gin gitea goquery gorm gorse grafana grpc grpc-gateway harness helm html hugo jaeger java javaee javascript jetbrains jquery js k3s kubernetes let's encrypt library license server longhorn meilisearch nodejs oneinstack open-webui openchamber opencode phpmyadmin phpstorm pi podman pritunl prometheus recovery redis release reset resty rook rufus screen shell ssl supervisor traefik trarfik twrp typecho ubuntu ueditor unzip vagrant vim virtualbox vitess xmind zip zsh 七牛云 下载 产品 从零开始 代理 何时 分区 初体验 刷机 压缩 启动 启动盘 命令 命令大全 命令行 坑 增量订阅 墨刀 好不好 学习路线 安装 实例 密码 小程序 工具 常用命令 开发 开始 引导 微信 微信第三方 快捷键 思维导图 怡和 怡和物业 成立 成长之路 技能树 抖音 指向 授权 排错 推广 提升 搜索 效率 文件 新手 新用户 方案 昆明 昆明水库 最新活动 权限 水库 泛域名 流程图 消费组件 润城 激活 爬虫 版本更新 狼人杀 磨刀 程序 笔记本 管理 米粉卡 系统 终身会员 维修 编程 老用户 联通 自加 解压 解析 设计 设计规范 证书 详解 语法 跨域 软件 迁移 钓鱼 阿里云 面板

友情链接

其它