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
$token = '<API_Token>' | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
$body = @{ | |
accountName="<Your_account>" | |
projectSlug="<Your_project_slug>" |
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
rem windows2012R2スクリプト | |
rem icmp(ping)を通す設定(”profile=public|private|domain|any”で個別指定可能) | |
netsh advfirewall firewall add rule name="ICMPv4 ping許可" protocol=icmpv4:8,any dir=in action=allow | |
rem メモ帳のショートカットをデスクトップに作成【done】 | |
powershell -Command "&{$WsShell = New-Object -ComObject WScript.Shell; $Shortcut = $WsShell.CreateShortcut('C:\Users\Administrator\Desktop\memo.lnk'); $Shortcut.TargetPath = 'C:\Windows\System32\notepad.exe'; $Shortcut.IconLocation = 'C:\Windows\System32\notepad.exe'; $Shortcut.Save()} | |
rem コマンドプロンプトのショートカットをデスクトップに作成【done】 | |
powershell -Command "&{$WsShell = New-Object -ComObject WScript.Shell; $Shortcut = $WsShell.CreateShortcut('C:\Users\Administrator\Desktop\cmd.lnk'); $Shortcut.TargetPath = 'C:\Windows\System32\cmd.exe'; $Shortcut.IconLocation = 'C:\Windows\System32\cmd.exe'; $Shortcut.Save()} |
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
#!/bin/bash | |
# This file must be executable to work! chmod 755! | |
# | |
# The LUKS key must exist as a file at /etc/.keys/${device}.key | |
# Protect this directory: root as user/group, 400 as permissions | |
# | |
# Edit your autofs master file to include something like | |
# /mnt/crypt /etc/auto.luks --timeout=600 | |
# | |
# Then you can access your LUKS encrypted disk with |
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
<# | |
This script performs the 'search' phase of a Windows Update, using the standard WUA API. | |
It does not download or install updates. | |
Sole purpose of this script is to find out how long it takes to download the required cabfile, | |
then process it against a live system and return the list of updates available for that system. | |
#> | |
function DownloadFile { | |
param ( | |
[Parameter(Mandatory=$true,Position=0)] $url, | |
[Parameter(Mandatory=$true,Position=1)] $file |
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
# ================================================================================ | |
# ObjectStorageUploader.py | |
# © Copyright IBM Corporation 2014. | |
# LICENSE: MIT (http://opensource.org/licenses/MIT) | |
# ================================================================================ | |
import argparse | |
import os | |
import math | |
import http.client |
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
function Escape-JSONString($str){ | |
if ($str -eq $null) {return ""} | |
$str = $str.ToString().Replace('"','\"').Replace('\','\\').Replace("`n",'\n').Replace("`r",'\r').Replace("`t",'\t') | |
return $str; | |
} | |
function ConvertTo-JSON($maxDepth = 4,$forceArray = $false) { | |
begin { | |
$data = @() | |
} |
NewerOlder