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 / 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で開いてください。
Loading
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 October 2, 2016 04:22
同じ例外なげれるのね
class Hoge extends Exception {
void method() throws Hoge, Hoge, Hoge {
}
}
@irof
irof / Main.java
Created December 7, 2015 14:43
Springさんのクラススキャンのところを抜粋してみた
import java.net.JarURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.jar.JarFile;
public class Main {
public static void main(String[] args) throws Exception {