Skip to content

Instantly share code, notes, and snippets.

View tanukiti1987's full-sized avatar
💮

Ryusuke Sekiguchi tanukiti1987

💮
View GitHub Profile
@tanukiti1987
tanukiti1987 / memories-management.mdc
Created February 25, 2025 01:36
Scratchpad and Memories for Cursor
---
description: メモリー管理ルール
globs: *
---
# メモリー管理ルール
メモリーファイルの管理と更新に関するルール。
<rule>
name: memories_management

あなたは高度な問題解決能力を持つAIアシスタントです。以下の指示に従って、効率的かつ正確にタスクを遂行してください。

まず、ユーザーから受け取った指示を確認します:

<指示> {{instructions}} </指示>

この指示を元に、以下のプロセスに従って作業を進めてください:

require 'aws-sdk-s3'
require 'fileutils'
require 'concurrent'
class S3RecursiveClient
def initialize(bucket_name, parallel_count: 8)
@s3 = Aws::S3::Client.new
@bucket_name = bucket_name
@parallel_count = parallel_count
end

Vue3 を使いたいときの意思決定の仕方

Vue3の便利そうな機能

  • https://speakerdeck.com/kazupon/matinimatuta-vue-dot-js-3
  • SFC の script で定義された変数を style に渡せるようになるかも
  • Vuedx でテンプレート内の型チェックができるようになるかも(開発中)
  • Vite はめっちゃ速いぞ。大規模アプリじゃなければ、入れる価値あるかも。
# https://devcenter.heroku.com/articles/container-registry-and-runtime
heroku plugins:install heroku-container-registry
heroku container:login
heroku container:push --app YOUR_APP web
# docker run -e PORT=YOUR_PORT -e RACK_ENV=development -e PUBLIC_MAILGUN_API_KEY=xxx -e MAILGUN_API_KEY=xxx -p YOUR_PORT:YOUR_PORT m

共通の下準備

  1. https://github.com/tanukiti1987/google_drive_transfer#1-authorization を元に google api client idgoogle api secret key を発行する。
  2. 適当なフォルダ以下で git clone git@github.com:tanukiti1987/google_drive_transfer.git する
  3. cd google_drive_transfer する
  4. bundle install && bundle exec bin/google_drive_transfer setup する
  5. メッセージの通り、1で作った client idsecret key を入れる
  6. ここまでの状態で下準備完了

人数分の下準備

https://github.com/awslabs/todo-sample-app

を AWS上で動くようにする。

要件

  • https で動くこと
  • Dockerで動くようにすること
  • 1つのコマンドでデプロイできるようにすること
  • ロールバックできること
E, [2016-03-06T02:20:33.447313 #1] ERROR -- : An error as occured while processing response. Original Exception: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A (OandaAPI::RequestError)
/usr/local/bundle/gems/oanda_api-0.9.4/lib/oanda_api/client/client.rb:119:in `rescue in execute_request'
/usr/local/bundle/gems/oanda_api-0.9.4/lib/oanda_api/client/client.rb:105:in `execute_request'
/usr/local/bundle/gems/oanda_api-0.9.4/lib/oanda_api/client/namespace_proxy.rb:107:in `method_missing'
/app/jiji2/src/jiji/model/securities/internal/oanda/rate_retriever.rb:19:in `retrieve_current_tick'
/app/jiji2/src/jiji/model/trading/brokers/abstract_broker.rb:30:in `tick'
/app/jiji2/src/jiji/model/trading/brokers/abstract_broker.rb:104:in `refresh'
/app/jiji2/src/jiji/model/trading/jobs/notify_next_tick_job.rb:22:in `before_do_next'
/app/jiji2/src/jiji/model/trading/jobs/notify_next_tick_job.rb:16:in `exec'
/app/jiji2/src/jiji/model/trading/process.rb:37:in `do_next_job'
require 'rubygems'
require 'RMagick'
require 'readline'
# input your scale target
puts 'input your scale target (ex. 0.3)'
scale = Readline.readline('> ').to_f
# extract image file name at current directory
file_names = Dir.entries('.').map{|file_name| file_name if file_name.include?('jpg')}.compact