Skip to content

Instantly share code, notes, and snippets.

💭
🤣

netnr netnr

💭
🤣
View GitHub Profile
@netnr
netnr / Clear_SQLServer_Log.sql
Created May 31, 2020
SQLServer 清理日志文件
View Clear_SQLServer_Log.sql
USE [master]
GO
ALTER DATABASE DBNAME SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE DBNAME SET RECOVERY SIMPLE -- 设置简单模式
GO
USE DBNAME
GO
DBCC SHRINKFILE (N'DBNAME_log' , 2, TRUNCATEONLY) -- 设置压缩后的日志大小为 2M
GO
@netnr
netnr / web.config
Created May 17, 2020
IIS 重写 URL,移除 .html 后缀,依赖 URL Rewrite
View web.config
<!-- web.config -->
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteHTML">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
@netnr
netnr / cat-name
Created May 14, 2020
查看linux系统的版本名称
View cat-name
# Linux内核版本
uname -a
uname -r
cat /proc/version
cat /etc/issue
# RedHat(centos)
cat /etc/redhat-release
@netnr
netnr / hostednetwork
Created Apr 9, 2020
电脑开启 WIFI 热点
View hostednetwork
# 示例:netsh wlan set hostednetwork mode=allow ssid=SSID名称 key=WIFI密码
netsh wlan set hostednetwork mode=allow ssid=NB key=notebook
# 开启
netsh wlan start hostednetwork
# 关闭
netsh wlan stop hostednetwork
@netnr
netnr / docker-manager.sh
Created Mar 28, 2020
docker可视化工具Portainer部署与汉化
View docker-manager.sh
docker search portainer # 搜索包
docker pull portainer/portainer # 下载镜像
# 本机部署
docker run -d -p 90:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data --name prtainer-test portainer/portainer
# 汉化部署(须下载汉化包)
docker run -d -p 90:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data -v /package/portainer_cn:/public --name prtainer-test portainer/portainer
# 访问 ip:90,初始化账号、密码,选择 Local --> Connect
# help
https://www.cnblogs.com/Bug-Hunter/p/12023130.html
@netnr
netnr / yum.sh
Created Mar 22, 2020
yum命令管理
View yum.sh
yum install package1 # 安装指定的安装包package1
yum groupinsall group1 # 安装程序组group1
yum update # 全部更新
yum update package1 # 更新指定程序包package1
yum check-update # 检查可更新的程序
yum upgrade package1 # 升级指定程序包package1
yum groupupdate group1 # 升级程序组group1
yum info package1 # 显示安装包信息package1
@netnr
netnr / cat-name
Created Mar 22, 2020
查看linux系统的版本名称
View cat-name
# Linux内核版本
uname -a
uname -r
cat /proc/version
cat /etc/issue
# RedHat(centos)
cat /etc/redhat-release
View npm-publish
npm login # 登录
npm init # 初始化 package.json 包的信息
npm publish # 发布
@netnr
netnr / npm-registry
Created Feb 27, 2020
设置或清除npm淘宝镜像
View npm-registry
# 设置淘宝镜像
npm config set registry https://registry.npm.taobao.org
# 清除淘宝镜像,恢复
npm config set registry https://registry.npmjs.org
@netnr
netnr / cat-name
Created Feb 20, 2020
查看linux系统的版本名称
View cat-name
# Linux内核版本
uname -a
uname -r
cat /proc/version
cat /etc/issue
# RedHat(centos)
cat /etc/redhat-release
You can’t perform that action at this time.