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
# encode from binary file to base64txt | |
powershell -C "& {$outpath = (Join-Path (pwd) 'out_base64.txt'); $inpath = (Join-Path (pwd) 'data.jpg'); [IO.File]::WriteAllText($outpath, ([convert]::ToBase64String(([IO.File]::ReadAllBytes($inpath)))))}" | |
# decode from base64txt to binary file | |
powershell -C "& {$outpath = (Join-Path (pwd) 'outdata2.jpg'); $inpath = (Join-Path (pwd) 'out_base64.txt'); [IO.File]::WriteAllBytes($outpath, ([convert]::FromBase64String(([IO.File]::ReadAllText($inpath)))))}" |
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
javascript:(function(){location.href='https://www.google.com/readit?url=%27+encodeURIComponent(location.href)})() |
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
import sys | |
import ctypes | |
user32 = ctypes.windll.user32 | |
def getClassName(hwnd): | |
resultString = ctypes.create_string_buffer("\000" * 32) | |
user32.GetClassNameA(hwnd, resultString, len(resultString)) | |
return resultString.value |
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
## myipcheck.ps1 | |
# グローバルIPをチェックしてメール通知する。 | |
# | |
# globalIPに変化がなくてもメール通知する。 | |
# globalIPに変化があった場合は追加CC先にもメールを送る。 | |
# | |
# このスクリプトを myipcheck.bat から呼び出す場合:: | |
# > powershell -NoProfile -ExecutionPolicy Unrestricted "%~dpn0.ps1" |
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
#!ipxe | |
## clonezilla-live toram & PXE+UEFI boot for Tiny PXE Server iPXE menu | |
## 1. extract clonezilla.iso to "pxesrv\ISO\clonezilla" | |
## 2. copy this file to "pxesrv\files\clonezilla.ipxe" | |
## 3. set pxesrv.exe params to:: | |
## - Boot File: ipxe-x86_64.efi | |
## - [x] Filename if user-class =gPXE or iPXE: clonezilla.ipxe | |
## | |
set boot-url http://${dhcp-server} | |
kernel ${boot-url}/ISO/clonezilla/live/vmlinuz initrd=initrd.img boot=live config noswap nolocales edd=on nomodeset vga=788 nosplash noprompt fetch=${boot-url}/ISO/clonezilla/live/filesystem.squashfs |
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
class FunClass { | |
[Array] funcSearch($argv1, $argv2, $argv3) { | |
#return "ACTION=3&ONLINE_MEDIA=%28%40kind%3D%3D1%26%40announcemediaid%3D%3D24%26%40writemediaid%3D%3D16%29%26%28%40subsubject%3A%3D0272H%29&SEARCH_START_DATE=20201101&SEARCH_END_DATE=20201101&j_encoding=UTF-8&NO_TERM_SEARCH=1&MAGAZINE_GET_COUNT=100"; | |
$param_body = "ACTION=3&ONLINE_MEDIA=%28%40kind%3D%3D1%26%40announcemediaid%3D%3D24%26%40writemediaid%3D%3D" + $argv1 + "%29%26%28%40subsubject%3A%3D" + $argv3 + "%29&SEARCH_START_DATE=" + $argv2 + "&SEARCH_END_DATE=" + $argv2 + "&j_encoding=UTF-8&NO_TERM_SEARCH=1&MAGAZINE_GET_COUNT=100"; | |
#return $argv3 + $argv2 + $argv1 | |
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession | |
$session.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36" | |
$session.Cookies.Add((New-Object System.Net.Cookie("SEARCH_RESULT_SELECTED", "`"COUNT=50`"", "/", ".bizboard.nikkeibp.co.jp"))) |
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 -NoProfile -ExecutionPolicy Unrestricted -File testarg.ps1 | |
Param( | |
[String]$arg1 = "" | |
) | |
if ($arg1 -eq "") { | |
echo "引数を指定してください。" | |
pause | |
exit | |
} |
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
@echo off | |
echo LANケーブルを抜いてください。 | |
pause | |
@echo on | |
powershell -Command "$devlan2 =Get-PnPDevice -FriendlyName 'Intel(R) Ethernet Connection I217-V'; Disable-PnpDevice $devlan2.DeviceID -Confirm:$false" | |
timeout 10 | |
powershell -Command "$devlan2 =Get-PnPDevice -FriendlyName 'Intel(R) Ethernet Connection I217-V'; Enable-PnpDevice $devlan2.DeviceID -Confirm:$false" | |
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
Set args = WScript.Arguments | |
Set objWSHApp = Wscript.CreateObject("Shell.Application") | |
if args.count=2 then | |
drive_letter = args.Item(0) | |
drive_displayname = args.Item(1) | |
With objWSHApp.NameSpace(drive_letter + "\").Items | |
.Item.Name = drive_displayname | |
end with | |
else |
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
#!/bin/sh | |
echo "src: /vmfs/volumes/$1" | |
echo "dest: /vmfs/volumes/$2" | |
echo "machine: $3" | |
ls -l /vmfs/volumes/$1/$3/ | |
read -p "Press [Enter] key to continue." |