Skip to content

Instantly share code, notes, and snippets.

View mryhryki's full-sized avatar
😄

MORIYA Hiroyuki mryhryki

😄
View GitHub Profile
@mryhryki
mryhryki / !README.md
Last active February 15, 2023 05:27
Build eml-parse-js

example-nutjs

Setup

$ npm install

Execute

google-oauth-for-google-photos

Setup

$ npm run setup
# Edit ./config.js file

Execute

@mryhryki
mryhryki / !README.md
Last active August 12, 2023 03:43
This is a sample to copy a file between two S3 buckets on four different ways with AWS SDK for JavaScript.

s3-copy

This is a sample to copy a file between two S3 buckets on four different ways with AWS SDK for JavaScript.

Setup

$ npm install

$ npm run setup
@mryhryki
mryhryki / !README.md
Last active June 27, 2022 08:31
AES CBC encrypt / decrypt example on Deno

AES CBC encrypt / decrypt example on Deno

How to Use

Encrypt data

$ cat {PLAIN_FILE} | deno run --allow-env=SECRET_KEY,IV ./script.ts encrypt > {ENCRIYPT_FILE}
/*
# AWS Signature V4
- https://docs.aws.amazon.com/ja_jp/general/latest/gr/signature-version-4.html
## How to use (Deno)
```shell
export AWS_ACCESS_KEY_ID="(Your AWS Access Key ID)"
@mryhryki
mryhryki / !README.md
Last active March 15, 2022 00:42
Resize on Canvas

Resize on Canvas

@mryhryki
mryhryki / aes-256-cbc_with_openssl.sh
Created January 24, 2022 07:58
AES-256-CBC with OpenSSL
#!/usr/bin/env bash
export PASS="(Your Password)"
function encrypt() {
openssl enc -e -aes-256-cbc -pass "env:PASS" -iter 100 | base64
}
function decrypt() {
base64 --decode | openssl enc -d -aes-256-cbc -iter 100 -pass "env:PASS"
@mryhryki
mryhryki / !README.md
Last active January 30, 2023 09:05
Node.js script pack template for private use.

{{GIST_NAME}}

Setup

$ npm install

Execute

@mryhryki
mryhryki / !README.md
Last active July 28, 2022 07:14
Convert mbox to eml files by Node.js

Convert mbox to eml files by Node.js

Setup

  1. Install Node.js
  2. Run npm install
  3. Copy mbox file on this directory.

$ cp /path/to/your/mbox/file ./