Send SSH public key from your local computer to the remote server. Run this command at local.
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
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", | |
| "disabledProfileSources": [ "Windows.Terminal.Wsl" ], | |
| "copyOnSelect": true, | |
| "copyFormatting": false, | |
| "largePasteWarning": false, |
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
| version: "3.0" | |
| services: | |
| mackerel-agent: | |
| image: mackerel/mackerel-agent:latest | |
| container_name: mackerel-agent | |
| hostname: ${HOSTNAME:?} | |
| environment: | |
| apikey: <APIKEY> | |
| auto_retirement: 0 |
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
| az provider list --query '[].namespace' --output tsv | grep -iF microsoft | xargs -n1 az provider register -n |
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
| #!/usr/bin/env bash | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| aws ec2 describe-regions \ | |
| --query 'Regions[].{Name:RegionName}' \ | |
| --output text \ | |
| | while read -r region | |
| do |
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
| Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase |
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
| :: 次の時間が経過後スリープする(なし) | |
| powercfg /setacvalueindex SCHEME_BALANCED SUB_SLEEP STANDBYIDLE 0 | |
| powercfg /setdcvalueindex SCHEME_BALANCED SUB_SLEEP STANDBYIDLE 0 | |
| :: 次の時間が経過後休止状態にする(なし) | |
| powercfg /setacvalueindex SCHEME_BALANCED SUB_SLEEP HIBERNATEIDLE 0 | |
| powercfg /setdcvalueindex SCHEME_BALANCED SUB_SLEEP HIBERNATEIDLE 0 | |
| :: カバーを閉じたときの操作(何もしない) |
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
| [automount] | |
| enabled = true | |
| options = "metadata,umask=22,fmask=111" | |
| [interop] | |
| enabled = false | |
| appendWindowsPath = false |
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
| #!/usr/bin/env python | |
| import imghdr | |
| import os | |
| import shutil | |
| import struct | |
| sldir = os.path.expanduser('~\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets') | |
| wpdir = os.path.expanduser('~\Pictures\wallpaper') | |
| if not os.path.isdir(sldir): |
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
| try { | |
| $orig_eap = $ErrorActionPreference | |
| $ErrorActionPreference = 'Stop' | |
| $wp = [Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent() | |
| if ($wp.IsInRole("Administrators")) { | |
| # Put commands here for running with Administrator privileges | |
| } | |
| else { | |
| throw "Administrator privilege required. Please run this script with an elevated PowerShell prompt." |