- Download Raspbian for Raspberry Pi
- Version:November 2018
- Release date:2018-11-13
- Kernel version:4.14
- お約束のコマンド
sudo apt update
sudo apt upgrade
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
<?php | |
$server = var_export( $_SERVER, true ); | |
file_put_contents( date('YmdHis')."_S.txt", var_export( $server,true ) ); | |
$method = $_SERVER['REQUEST_METHOD']; | |
if ($method == 'POST') { | |
$post = var_export( $_POST, true ); | |
file_put_contents( date('YmdHis')."_P.txt", var_export( $post,true ) ); | |
} |
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
# 固定長のShift_JISファイルの特定位置の文字を削除する | |
$filename = "hogehoge.txt" | |
$tempfile = "ZZZZZ_$filename" | |
$enc = [Text.Encoding]::GetEncoding("Shift_JIS") | |
$fhIn = New-Object System.IO.StreamReader($filename, $enc) | |
$fhOut = New-Object System.IO.StreamWriter($tempfile, $false, $enc) | |
$isCuted = $FALSE | |
# 1行ずつ処理 | |
while (($l = $fhIn.ReadLine()) -ne $null) { |
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
var AWS = require('aws-sdk'); | |
const ec2 = new AWS.EC2(); | |
exports.handler = (event, context, callback) => { | |
if(typeof(event.ec2id) !== "undefined") { | |
ec2.startInstances({InstanceIds: [event.ec2id]}).promise() | |
.then((r) => { | |
console.log("START EC2 instance", event.ec2id); | |
callback(null, 'START EC2 instance: ' + event.ec2id); |
Windows10 2004(20H1)でPowerShellでWindowsUpdateを実行するのは無理な様子。
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/bash | |
aws workspaces describe-workspaces > workspaces.json | |
cat workspaces.json | jq -r '.["Workspaces"][] | [.DirectoryId, .UserName, .ComputerName, .WorkspaceId, .IpAddress, .BundleId, .WorkspaceProperties.RunningMode, .WorkspaceProperties.ComputeTypeName, .WorkspaceProperties.RootVolumeSizeGib, .WorkspaceProperties.UserVolumeSizeGib, .WorkspaceProperties.RunningModeAutoStopTimeoutInMinutes] | @csv' > workspaces.csv | |
aws workspaces describe-workspace-bundles > bundles.json | |
cat bundles.json | jq -r '.["Bundles"][] | [.BundleId, .Name, .Description ] | @csv' > bundles.csv | |
rm taglist.csv | |
for f in `cat workspaces.json | jq -r '.["Workspaces"][] | .WorkspaceId'`; do | |
aws workspaces describe-tags --resource-id $f | jq -r '.["TagList"][] | ["'$f'", .Key, .Value] | @csv' >> taglist.csv |
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
composer config -g repositories.packagist composer https://packagist.jp | |
composer global require hirak/prestissimo |
sudo apt update
sudo apt upgrade
sudo vi /etc/apt/sources.list