Skip to content

Instantly share code, notes, and snippets.

View czlc's full-sized avatar

czlc czlc

  • None
View GitHub Profile
@czlc
czlc / win-ss
Last active April 17, 2022 15:12 — forked from dreamlu/win-ss
windows终端翻墙,简易方式
环境:shadowsocks、windows
本地ss端口设置(这里1080)
cmd命令行:(不用socks5)(临时设置)(也可放置环境变量)
set http_proxy=http://127.0.0.1:58591
set https_proxy=http://127.0.0.1:58591
ps:一定要用cmd命令行,千万别用powershell !!!
简易测试命令:curl https://www.google.com(别用ping)
@czlc
czlc / private_fork.md
Created September 22, 2021 06:34 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@czlc
czlc / nbt.lua
Created August 22, 2018 13:02 — forked from pingbird/nbt.lua
Lua NBT encoder and decoder
--[[
Lua NBT encoding and decoding by PixelToast, public domain
example output (serialized) from a player.dat: http://hastebin.com/kogupimizi.txt
requires string.pack/string.unpack
note: nbt is usually gzipped, you must inflate it before decoding
]]
nbt={}
@czlc
czlc / delete_git_submodule.md
Created April 7, 2018 03:21 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
function string.fromhex(str)
return (str:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end
function string.tohex(str)
return (str:gsub('.', function (c)
return string.format('%02X', string.byte(c))
end))