- force reset to the version of the last two 取消当前版本之前的两次提交
git reset --hard HEAD~2
- force push to the remote re 强制提交到远程版本库,从而删除之前的两次提交数据
git push origin HEAD --force
标签:
git
日期: 2014-06-20 17:30:06, 11 years and 153 days ago
git reset --hard HEAD~2
git push origin HEAD --force
获取windows网络状态有三种方式:
InternetGetConnectedState(wininet.dll)直接获取
GetAdaptersAddresses(iphlpapi.dll)枚举网络适配器
Network Awareness
NLA in Windows XP
NLM in Vista or windows 7
netaware - https://raw.githubusercontent.com/codepongo/utocode/master/windows/netaware.cpp
def CheckAdapterAddress():
addresses = GetAdaptersAddresses()
for a in addresses:
if a.OperStatus == IfOperStatusUp
and a.IfType != IF_TYPE_SOFTWARE_LOOPBACK
and a.FirstUnicastAddress->Address.lpSockaddr != '192.168.0.1':
return True;
return False
def CheckAdaptersInfo():
adapters = GetAdaptersInfo()
for a in adapters:
if a.DhcpEnabled:
if a.DhcpServer.IpAddress == '255.255.255.255':
return True;
else:
for ip in a.IpAddressList:
if ip == '0.0.0.0':
return True;
return False;
def CheckIPAddrTable():
tables = GetIpAddrTable()
for t in tables:
if t.dwAddr != 0 && t.dwAddr != 0x0100007F:
return True
return False
create a file and name it "desktop.scf" 新建名为“desktop.scf“的文件
copy bellow content in it 复制下面内容到文件中
[Shell] Command=2 IconFile=%SystemRoot%system32SHELL32.dll,34 [Taskbar] Command=ToggleDesktop
menu: Debug - New Breakpoint(ctrl+B) vs菜单:调试 - 新断点(ctrl+B)
Function:{,,dynamic.dll}_functionW@size
e.g.
{,,kernel32.dll}_CreateProcessW@40
for example 例如:
int
WINAPI
MessageBoxW(
__in_opt HWND hWnd,
__in_opt LPCWSTR lpText,
__in_opt LPCWSTR lpCaption,
__in UINT uType);
size = sizeof(HWND) + sizeof(LPCWSTR) + sizeof(LPCWSTR) + sizeof(UINT)
或者 or
C:\Program Files (x86)\Debugging Tools for Windows (x86)>dbh.exe -s:srv*C:\Symbo ls*http://msdl.microsoft.com/Download/Symbols -d C:\Windows\SysWOW64\user32.dl l enum *MessageBox*
so, the breakpoint at the 'messagebox' function is 所以,messagebox函数的断点function应添为
{,, User32.dll}_MessageBoxW@16
takeown /f * /a /r /d y
cacls * /T /G administrators:F
cacls * /T /E /G administrators:F
cacls \\Server\path /t /e /r "mddq\domain admins" cacls \\Server\path /t /e /r "mddq\domain admins"