Skip to content

Instantly share code, notes, and snippets.

@Lycheejam
Lycheejam / chatgpt_log_inspector_report.md
Last active April 19, 2023 16:29
inspectorの診断結果を出力してスプレッドシートにインポートするまでをChatGPTに作らせてみた。

user: あなたはソフトウェアエンジニアです。 以下の処理を実現するスクリプトを作成してください。

制約条件

  • 処理言語はPython 3.8を使用してください。
  • Pythonで利用するGoogle Spreadsheetの操作ライブラリにはgspread 5.8.0を利用してください。
  • Google Spreadsheetを操作する際の認証にはGoogle Cloud Platformのサービスアカウントを利用してください。
  • Google Spreadsheetは既存のSpreadsheetを利用します。仮にスプレッドシートAとしてください。
  • レポートを出力するAmazon S3バケットは既存のバケットを利用します。仮にバケットBとしてください。
$ ./getopts_sample2.sh -a -b qwer -c asdf -d ZXCV
"-a"オプションが指定されました。
"-b"オプションが指定されました。
→値はqwerです。
"-c"オプションが指定されました。
→値はasdfです。
"-d"オプションが指定されました。
引数に"ZXCV"が指定されました。
@Lycheejam
Lycheejam / mysqldump_and_restore_for_docker.sh
Last active November 24, 2019 04:57
dockerのmysqlからmysqldumpとデータリストアが出来るシェル
#!/bin/sh
#
# database dump & restore for docker mysql
#
ACTION=$1
help() {
cat << EOS
 やる気はまだない
   ⊂⌒/ヽ-、__
 /⊂_/____ /
  ̄ ̄ ̄ ̄ ̄ ̄ ̄
    ∩∩
   (´・ω・) < 吾輩はやれば出来る子である。
   _| ⊃/(___
 / └-(____/
  ̄ ̄ ̄ ̄ ̄ ̄ ̄
ついてこれるかな?
∧_∧ =-
(´・ω・`)`つ=- ザザッ
 `つ \ =-
 \,⌒\\,,,_=-
私のスピードに
 -= ∧_∧
-=と(´・ω・`) シュタッ
 -=/ と_ノ
-=_//⌒ソ
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace inheritance
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace kisoren
{
class Program
{
static void Main(string[] args)
Public Const CharCd = "UTF-8"
Function fileWriter(ByRef dtStr As String, ByRef filePath)
'stream用意
Dim adoSt As Object
Set adoSt = CreateObject("ADODB.Stream")
With adoSt
.Type = adTypeText 'テキストタイプを指定
.Charset = CharCd '文字コード指定