Skip to content

Instantly share code, notes, and snippets.

View irof's full-sized avatar
🏠
Working from home

irof irof

🏠
Working from home
View GitHub Profile
package bc;
import org.bouncycastle.bcpg.CompressionAlgorithmTags;
import org.bouncycastle.openpgp.*;
import org.bouncycastle.openpgp.bc.BcPGPObjectFactory;
import org.bouncycastle.openpgp.bc.BcPGPPublicKeyRing;
import org.bouncycastle.openpgp.bc.BcPGPSecretKeyRing;
import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor;
import org.bouncycastle.openpgp.operator.PGPDataEncryptorBuilder;
import org.bouncycastle.openpgp.operator.bc.*;
@irof
irof / SuburiComponentObjectProvider.java
Last active March 18, 2023 01:27
自身をインジェクションして `@Transactional` を動作させるサンプル
package me.irof.suburi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@irof
irof / gist:3154261
Created July 21, 2012 02:24
コメントをコメントアウトされたでござる
// 2012/07/21 irof 修正開始
//// 2012/07/21 削除開始
//// // 間違ったコメント
//// 2012/07/21 削除終了
// 2012/07/21 irof 削除開始
// // 間違ったコメント
// 2012/07/21 irof 削除終了
// 2012/07/21 irof 修正終了
someMethod(arg);
@irof
irof / OperationController.java
Last active October 24, 2022 04:43
ログとかの確認をするためのコントローラー実装
package customer.experience.presentation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Locale;
@irof
irof / README.md
Last active June 8, 2021 04:50
Gitでミスったときのリカバリコマンド
@irof
irof / build.gradle
Created October 15, 2020 03:04
aws-java-sdkを入れたときにruntimeに入るの全部
plugins {
id 'java'
}
repositories {
jcenter()
}
dependencies {
implementation 'com.amazonaws:aws-java-sdk:latest.release'
@irof
irof / branching-patterns.svg
Last active June 18, 2020 15:40
ソースコードブランチ管理のパターン https://bliki-ja.github.io/PatternsForManagingSourceCodeBranches/ のパターン関連図。リンクを使うときはRAWで開いてください。
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@irof
irof / git-reflog-test.sh
Last active May 31, 2020 12:36
gitのreflogでブランチ消しても辿れるって話
git init
git commit --allow-empty -m"1"
git commit --allow-empty -m"2"
git checkout -b test-branch
git commit --allow-empty -m"3"
git commit --allow-empty -m"4"
git checkout master
git branch -D test-branch
git reflog
@irof
irof / pre-commit
Created November 7, 2019 11:54
CircleCIの設定ファイル検証をコミット前にするやつ
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@irof
irof / Hoge.java
Created December 1, 2012 05:58
コレクションをアレコレするのをLambdaで書いてみた
import java.util.*;
public class Hoge {
static class Fuga {
final String color;
final int weight;
Fuga(String color, int weight) {
this.color = color;
this.weight = weight;