This file contains 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
<MARKEDONE:~/bin> | |
✏ showver lua52.dll | |
5.2.3 5.2.3 |
This file contains 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
::rem:: --[[ vim:set ft=lua: | |
@lua "%~f0" %1 %2 %3 %4 %5 %6 %7 %8 %9 & exit /b | |
]]-- | |
function getGateway() | |
local ipconfig = io.popen("ipconfig","r") | |
for line in ipconfig:lines() do | |
local m = line:match("デフォルト.*%s([0-9]+%.[0-9]+%.[0-9]+%.[0-9]+)") | |
if m then | |
ipconfig:close() |
This file contains 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
package main | |
import "fmt" | |
import "os" | |
func main() { | |
for _, arg1 := range os.Args[1:] { | |
for _, r := range arg1 { | |
fmt.Printf("[%0X]", r) | |
} |
This file contains 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
powershell Set-ExecutionPolicy -Scope CurrentUser RemoteSigned |
This file contains 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
powershell Set-ExecutionPolicy -Scope CurrentUser Restricted |
This file contains 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
@more +1 "%~f0" | powershell -Command "-" & exit /b 0 | |
Write-Host 'Step1' | |
Write-Host 'Step2' | |
if ( $true ){ | |
Write-Host 'Step3' | |
Write-Host 'Step4' | |
} else { | |
Write-Host 'Step5' | |
} | |
Write-Host 'End' |
This file contains 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
$ git branch | |
* (detached from 5624b10) | |
master |
This file contains 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
::rem:: --[[ vim:set ft=lua: | |
@lua "%~f0" %* & exit /b | |
]]-- | |
t = {} | |
for i=1,100000 do | |
table.insert(t,"x") | |
end | |
print(os.clock()) |
This file contains 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
package main | |
import "fmt" | |
import "os" | |
func main() { | |
for _, arg := range os.Args[1:] { | |
for _, ch := range arg { | |
fmt.Printf("[%X] ", ch) | |
} |
This file contains 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
Option Explicit | |
If WScript.Arguments.Count <= 0 Then | |
Dim shellApp : Set shellApp = CreateObject("Shell.Application") | |
shellApp.ShellExecute "wscript.exe","""" & WScript.ScriptFullName & """ uac" , "" , "runas" | |
Set shellApp = Nothing | |
WScript.Quit | |
End If | |
Dim wshShell : Set wshShell=CreateObject("WScript.Shell") | |
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject") | |
Dim sysEnv : Set sysEnv=wshShell.Environment |