Skip to content

Instantly share code, notes, and snippets.

View speaktech-account's full-sized avatar

speaktech speaktech-account

View GitHub Profile
@speaktech-account
speaktech-account / file0.txt
Created October 27, 2018 10:39
How to export / import Windows share permission settings ref: https://qiita.com/speaktech/items/2785e989557be4635700
# 例1) ディレクトリの移動
PS D:\Tmp> Set-Location -Path D:\Tmp\share
PS D:\Tmp\share>
@speaktech-account
speaktech-account / Archive-FileToS3.ps1
Created October 27, 2018 10:35
The story when I verified whether the data copied to S3 is really the same as the copy source ref: https://qiita.com/speaktech/items/fd03a856b31afbb2ec73
# Archive-FileToS3 archives local files which is older than specified days in a path to S3bucket with verifying integrity of uploaded S3objects.
# The verification method is to check if an eTag of S3object matches an eTag value calculated from a local file.
# Get-S3ETagHash calculates an eTag for a local file that should match the S3 eTag of the uploaded file.
# Credit goes to Sean Bamforth (https://gist.github.com/seanbamforth/9388507) and chrisdarth(https://gist.github.com/chrisdarth/02d030b31727d70d2c63)
function Archive-FileToS3 {
[cmdletbinding()]
Param (
[Parameter(Mandatory=$true)]
@speaktech-account
speaktech-account / file2.txt
Last active October 19, 2018 10:58
When I do bad things, I tried to construct an unfriendly world (Linux) to be reported immediately <Prequel> ref: https://qiita.com/speaktech/items/43f2c99e27a4515eddac
mkdir /etc/vimrc.d
@speaktech-account
speaktech-account / Archive-FileToS3.ps1
Last active December 11, 2017 12:49
Archives local files to S3bucket with verifying integrity. Powershell
# Archive-FileToS3 archives local files which is older than specified days in a path to S3bucket with verifying integrity of uploaded S3objects.
# The verification method is to check if an eTag of S3object matches an eTag value calculated from a local file.
# Get-S3ETagHash calculates an eTag for a local file that should match the S3 eTag of the uploaded file.
# Credit goes to Sean Bamforth (https://gist.github.com/seanbamforth/9388507) and chrisdarth(https://gist.github.com/chrisdarth/02d030b31727d70d2c63)
function Archive-FileToS3 {
[cmdletbinding()]
Param (
[Parameter(Mandatory=$true)]