Windows+R(執行): winver
CMD: ver
PowerShell: [System.Environment]::OSVersion.Version
PowerShell: Get-ComputerInfo -Property Windows*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VS Code key bindings for termianl operation. | |
[ | |
{ "key": "ctrl+a", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\u0001"} }, | |
{ "key": "ctrl+b", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\u0002"} }, | |
{ "key": "ctrl+c", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\u0003"} }, | |
{ "key": "ctrl+d", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\u0004"} }, | |
{ "key": "ctrl+e", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\u0005"} }, | |
{ "key": "ctrl+f", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\u0006"} }, | |
{ "key": "ctrl+g", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\u0007"} }, | |
{ "key": "ctrl+h", "command": "workbench.action.terminal.sendSequence", "whe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bcdedit /copy "{current}" /d "Hyper-V" | |
bcdedit /set "{current}" hypervisorlaunchtype off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Random Request Script | |
def list = [] | |
new File('C:/Users/HSChang/Documents/Work/AML/Requests').eachFile { list << it } | |
def filename = list[new Random().nextInt(list.size())] | |
log.info(filename) | |
def request = context.testCase.getTestStepByName('VaryRequest').getTestRequest() | |
request.setRequestContent(new File(filename.getPath()).getText("UTF-8")) | |
// Save Output Script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /F "tokens=1,2 delims=.+" %%a in ('wmic os get localdatetime ^| findstr "+"') DO set TIME_NOW=%%a%%b | |
SET TIME_NOW=%TIME_NOW:~0,17% | |
ECHO %TIME_NOW% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-NetFirewallRule | | |
Where-Object Direction -eq Inbound | | |
Format-Table -Property DisplayName, Enabled, Profile, Direction, Action, ` | |
@{Name='Protocol';Expression={($PSItem | Get-NetFirewallPortFilter).Protocol}}, ` | |
@{Name='LocalPort';Expression={($PSItem | Get-NetFirewallPortFilter).LocalPort}}, ` | |
@{Name='RemotePort';Expression={($PSItem | Get-NetFirewallPortFilter).RemotePort}}, ` | |
@{Name='IcmpType';Expression={($PSItem | Get-NetFirewallPortFilter).IcmpType}}, ` | |
@{Name='DynamicTarget';Expression={($PSItem | Get-NetFirewallPortFilter).DynamicTarget}} ` | |
-AutoSize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.from( | |
document.querySelectorAll( | |
"html > body > div:nth-child(1) > div > div:nth-child(1)" + | |
"> div:nth-child(1) > div > div > div > div:nth-child(1)" + | |
"> div:nth-child(1)> div > div > div:nth-child(4) > div > div > div" + | |
"> div:nth-child(1) > div > div > div > div:nth-child(3) > div" + | |
"> div:nth-child(2) > div:nth-child(1) > a" | |
) | |
).map(tag => | |
[tag.href.split("facebook.com/")[1].replace("profile.php?id=", ""), tag.querySelector("span").innerHTML] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--prefix=/usr \ | |
--sysconfdir=/etc \ | |
--enable-dynamic \ | |
--enable-crypt \ | |
--enable-spasswd \ | |
--enable-modules \ | |
--enable-rlookups \ | |
--enable-backends=mod \ | |
--disable-bdb \ | |
--disable-hdb \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`semanage port --add --type ssh_port_t --proto tcp 1234` | |
`semanage port -a -t ssh_port_t -p tcp 1234` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
// Clear terminal history buffer | |
{ "key": "ctrl+l", "command": "workbench.action.terminal.clear", "when": "terminalFocus" }, | |
// Change ctrl+m from toggle tab focus mode to send carrage return | |
{ "key": "ctrl+m", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\r"} }, | |
// Change ctrl+f from find to send acknowledgement character | |
{ "key": "ctrl+f", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": {"text":"\u0006"} }, | |
] |