Skip to content

Instantly share code, notes, and snippets.

Dockerイメージの作成からECRにプッシュするまでのコマンド

docker image build -t sbcntr-backend:v1 .
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)
docker image tag sbcntr-backend:v1 ${AWS_ACCOUNT_ID}.dkr.ecr.ap-northeast-1.amazonaws.com/sbcntr-backend:v1
aws ecr --region ap-northeast-1 get-login-password | docker login --username AWS --password-stdin https://${AWS_ACCOUNT_ID}.dkr.ecr.ap-northeast-1.amazonaws.com/sbcntr-backend
docker image push ${AWS_ACCOUNT_ID}.dkr.ecr.ap-northeast-1.amazonaws.com/sbcntr-backend:v1
docker container run -d -p 8080:80 ${AWS_ACCOUNT_ID}.dkr.ecr.ap-northeast-1.amazonaws.com/sbcntr-backend:v1
@atsushi-kitazawa
atsushi-kitazawa / launch.json
Created October 3, 2022 14:35
launch.json template for golang
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Terraformer main",
"type": "go",
"request": "launch",
@atsushi-kitazawa
atsushi-kitazawa / Main.java
Last active September 30, 2022 15:23
file list example by FileVisitor.
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.nio.file.FileVisitOption;
import java.nio.file.FileVisitResult;
import java.nio.file.FileVisitor;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes;
@atsushi-kitazawa
atsushi-kitazawa / server.rs
Created June 16, 2022 03:57
rust tcp server (wip)
use std::net::TcpListener;
fn main() {
let result = TcpListener::bind("127.0.0.1:8888");
match result {
Result::Ok(listner) => {
let stream = listner.accept();
match stream {
Result::Ok((mut _stream, _)) => {println!("OK")},
@atsushi-kitazawa
atsushi-kitazawa / fyne_table.go
Last active June 12, 2022 07:14
fyne table cell update sample.
func RunTest() {
a := app.New()
e := a.NewWindow("test app")
tables(e, fetch("ABC"))
go func() {
fmt.Println("go routine")
time.Sleep(10 * time.Second)
fmt.Println("end sleep")
@atsushi-kitazawa
atsushi-kitazawa / heroku_memo.md
Last active January 30, 2022 06:53
my heroku memo.

コマンド

# start...
heroku restart
# app information
heroku list #show application list
heroku apps:info -a <app> #show applicatoin infomation
heroku logs #show applicatoin log
heroku addons -a <app> #show add-on list
# operation for app
@atsushi-kitazawa
atsushi-kitazawa / Main.java
Last active August 25, 2021 14:48
java reflection sample of super class fields.
package com.example;
import java.lang.reflect.Field;
import com.example.pojo.Device;
import com.example.pojo.Keyboard;
import com.example.pojo.iPhone;
public class Main {
public static void main(String[] args) {
@atsushi-kitazawa
atsushi-kitazawa / springboot_sample.md
Last active March 18, 2021 14:16
todo list of my spring boot rest application

TODO

  • Spring Boot のインストール
  • CRUDのRESTAPIを作成する
  • テーブル設計
  • DB選定
  • DBのコンテナ
  • テーブル設計
  • テーブルに対してCRUDするRESTAPIを作成
  • テスト設計

仕様

  • アップロード、ダウンロードは日付あるいはMD5で判断
  • 上記は設定ファイルで指定できる
  • 同期対象のフォルダは設定ファイルで指定【済】
  • 認証情報は設定ファイルで指定できる
  • ディレクトリは階層を辿ることができる【済】
  • 単一モードはファジーファインダーで選択できる【済(ファジーファインダは未実装)】
  • 一括モードは確認が入る
  • setting.yaml のディレクトリ指定
@atsushi-kitazawa
atsushi-kitazawa / gh_commad
Created March 6, 2021 13:53
gh gist command memo
- gist create
gh gist create --public <filename> -d <description>
- gist edit
gh gist list -L 30
gh gist list -L 30 | awk '{ if(NR==1){print $1}}' | pbcopy
gh gist edit <id> -a <filename>
gh gist edit <id> -f <filename>