Skip to content

Instantly share code, notes, and snippets.

View hexiyou's full-sized avatar

He Xiyou hexiyou

View GitHub Profile
@hexiyou
hexiyou / PinDistrictApps.cmd
Created September 22, 2015 15:44 — forked from sirlancelot/PinDistrictApps.cmd
Windows 7 script to pin items to the taskbar. Can be placed in the default user's startup folder. Self-terminating.
@echo off
cscript PinItem.vbs /taskbar /item:"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Mozilla Firefox\Mozilla Firefox.lnk"
cscript PinItem.vbs /taskbar /item:"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Word 2007.lnk"
cscript PinItem.vbs /taskbar /item:"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Excel 2007.lnk"
cscript PinItem.vbs /taskbar /item:"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office PowerPoint 2007.lnk"

Gentoo 安装手册

第一步:下载安装介质

GentooMinimal Install CD 每周都会自动构建一个版本,服务器一般使用最新的 x86_64 版本。 国内的镜像下载地址是:

第二步:启动机器,设置网络环境和开启 SSH 服务

@hexiyou
hexiyou / m3u8-to-mp4.md
Created November 21, 2018 08:52 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@hexiyou
hexiyou / golang, ubuntu go get in china.md
Created December 13, 2018 09:59 — forked from alexniver/golang, ubuntu go get in china.md
ubuntu下, 使用shadowsock和Privoxy帮助你在命令行中, 无障碍进行go get

#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.

相对来说shadowsock则灵活得多.

#解决方案 shadowsock + Privoxy

思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.

@hexiyou
hexiyou / SetEnvironment.vbs
Last active October 27, 2020 12:37
VBS设置Windows环境变量通用脚本
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Windows Environment Setup Tool '
' @author:Lonelyer '
' @Email: hexiyou.cn@gmail.com '
' @date:2015-06 '
' '
' description:Add or Remove Path Environment or setup Others Environment variables. '
' (Java Environment etc..) '
' '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
@hexiyou
hexiyou / Open-Reg-From-Clipboard.vbs
Created December 13, 2018 10:12
从剪贴板获取注册表路径并打开
' Created by hackkey <hackkey@qq.com>
Dim objHTA
Dim cClipBoard
Dim WshShell
set objHTA=createobject("htmlfile")
cClipBoard=objHTA.parentwindow.clipboarddata.getdata("text")
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\LastKey", cClipBoard, "REG_SZ"
WshShell.Run "regedit.exe -m"
Set objHTA = nothing
@hexiyou
hexiyou / socks5_to_http.md
Created December 13, 2018 13:07 — forked from xwsg/socks5_to_http.md
socks5转换为 http 代理(使用privoxy)

目前只测试了Mac和Ubuntu

1.安装 privoxy

Mac

brew install privoxy

ubuntu

@hexiyou
hexiyou / notepad++.reg
Created January 20, 2019 05:20
notepad++
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}]
@="ANotepad++64"
[HKEY_CLASSES_ROOT\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\InprocServer32]
@="D:\\Software\\Study\\Notepad++\\NppShell_06.dll"
"ThreadingModel"="Apartment"
[HKEY_CLASSES_ROOT\CLSID\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}\Settings]
@hexiyou
hexiyou / .lftp.mockup.rc
Created September 9, 2019 22:22 — forked from gaubert/.lftp.mockup.rc
~/.lftp.rc parameters detailed
########## SETTINGS
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on.
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g.
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g.
# 'sleep forever' or 'set dns:cache-expire never'.
@hexiyou
hexiyou / aria2.bat
Created September 28, 2019 21:29 — forked from aa65535/aria2.bat
Aria2的配置文件 & 启动脚本
:: 启动后需要保留窗口, 关闭窗口则结束进程
aria2c --conf-path=aria2.conf -D