Skip to content

Instantly share code, notes, and snippets.

老祖宗留下来的玄学规律,照着做就对了
1.戒色,就是增财
2.早上不退货、中午不去别人家、下午不去看病人、晚上不借钱,这是规矩
3.钱比爱情重要,爱情比前途更难得,对的人会站在你的前途里
4.身体哪里不舒服了,要对它说三句话,“对不起,是我错了,没有照顾好你,以后我一定好好对你”有事要记得和身体商量,都说很管用
@wohugb
wohugb / 1.wsl.sh
Last active September 26, 2023 00:38
如何将wsl安装到E:盘并使用代理
# 1. 安装ubuntu
wsl --install
# 2. 关闭ubuntu,否则迁移失败
wsl -l -v
* Ubuntu Running 2
wsl --terminate ubuntu
# 或者
wsl --shutdown
wsl -l -v
@wohugb
wohugb / alpine.sh
Last active January 11, 2023 02:50
修改alpine时区
# 修改安装镜像
# 清华大学
# sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
# 淘宝
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# 安装设置删除清理
apk --update add tzdata && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone && \
apk del tzdata && \
@wohugb
wohugb / 1.issuer.yaml
Created December 25, 2022 03:38
cert-manager
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-staging
namespace: default
spec:
acme:
# The ACME server URL
server: https://acme-staging-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
@wohugb
wohugb / 1.hosts
Last active December 19, 2022 04:28
本地域名端口绑定
# /etc/hosts
127.0.0.1 example.com
@wohugb
wohugb / 1.edit-config-domain.sh
Last active December 13, 2022 08:49
knative 配置
# 在Knative使用自定义域名
kubectl edit cm config-domain --namespace knative-serving
# https://help.aliyun.com/document_detail/127204.html
@wohugb
wohugb / eth0.sh
Last active June 20, 2022 14:10
aliyun ecs ubuntu 强制升级导致网卡无法启动
ifup eth0
> unknown interface eth0
vim /etc/network/interfaces
# 添加
> auto eth0
> iface eth0 inet dhcp
reboot
@wohugb
wohugb / app.module.ts
Last active December 6, 2020 05:38
mat-datepicker locale localization 中文 本地化 angular material
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatNativeDateModule, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
import { MatDatepickerIntl, MatDatepickerModule } from '@angular/material/datepicker';
@NgModule({
declarations: [TradingComponent, OrderListComponent, EarningListComponent],
imports: [
...
@wohugb
wohugb / create-maxfiles.sh
Last active April 5, 2022 02:38
[hugo]socket: too many open files in system
touch /Library/LaunchDaemons/limit.maxfiles.plist
@wohugb
wohugb / NODE_OPTIONS.sh
Created September 11, 2019 07:48
ng serve 内存不够用
NODE_OPTIONS=--max-old-space-size=8192