海运的博客

此内容被密码保护

发布时间:June 7, 2016 // 分类:Windows // No Comments

请输入密码访问

Windows/Centos安装GO语言环境

发布时间:August 18, 2014 // 分类:GO // 3 Comments

Centos下使用epel源安装:

yum install golang

Centos/Linux下源码安装golang:

wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go*linux-amd64.tar.gz
mkdir $HOME/go
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc 
echo 'export GOPATH=$HOME/go' >> ~/.bashrc 
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> ~/.bashrc 
echo 'export GO111MODULE=auto' >> ~/.bashrc 
source $HOME/.bashrc 

安装go get工具:

yum install mercurial git bzr subversion

Windows下安装:

https://dl.google.com/go/go1.11.2.windows-amd64.zip

设置环境变量:

setx GOOS windows
setx GOARCH amd64
setx GOROOT "D:\Program Files\go"
setx GOBIN "%GOROOT%\bin"
setx GO111MODULE auto
setx PATH %PATH%;"D:\Program Files\go\bin"

交叉编译:

CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go

减小编译生成文件大小:

go build -ldflags "-s -w"

Windows7关机、重启、待机、休眠命令

发布时间:March 3, 2013 // 分类:Windows // No Comments

Windows7下一些关机、重启、待机、休眠命令,通过Autohotkey可实现快速关机等操作。

;立即关机,无提示、延时。
shutdown -p
;立即重启
shutdown -r -t 00
;进入休眠状态,如有关闭休眠则进入待机状态
rundll32.exe powrProf.dll,SetSuspendState

Windows7关闭休眠功能,混合睡眠将不可用:

powercfg -h off

此内容被密码保护

发布时间:February 21, 2013 // 分类:DNS,KMS // No Comments

请输入密码访问

通过映像劫持替换Windows记事本和任务管理器

发布时间:February 19, 2013 // 分类:Windows // No Comments

Windows下映像劫持可将特定程序重定向到自定义程序,不用使用文件替换或设置文件关联。
使用NotePad2替换系统自带记事本,导入以下注册表:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
"Debugger"="\"D:\\Program Files\\Notepad2\\Notepad2.exe\" /z"

替换系统任务管理器为Process Explorer:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe]
"Debugger"="\"D:\\Program Files\\ProcessExplorer\\procexp.exe\""
分类
最新文章
最近回复
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...