Skip to content

Instantly share code, notes, and snippets.

@yujiorama
yujiorama / password-formatter.rb
Created December 31, 2022 06:35
password formatter (google account password manager/firefox sync/lastpass)
#!/usr/bin/env ruby
require 'csv'
require 'optparse'
require 'pp'
require 'securerandom'
require 'time'
require 'uri'
# ==> chrome.csv <==
@yujiorama
yujiorama / helloworld.pl
Created May 3, 2022 06:00
perl hello world http server
# via A Minimal Perl Web Server
# https://flylib.com/books/en/1.2.1.48/1/
#
use strict;
use warnings;
use utf8;
use feature qw/say/;
use sigtrap qw/die untrapped normal-signals/;
@yujiorama
yujiorama / file_operation_test2.go
Created February 5, 2022 07:33
file_operation_test2.go
package main
import (
"os"
"runtime"
"strings"
"testing"
"github.com/sclevine/spec"
. "github.com/onsi/gomega"
@yujiorama
yujiorama / file_operation_test.go
Created February 5, 2022 07:32
file_operation_test.go
package main
import (
"os"
"testing"
"github.com/sclevine/spec"
. "github.com/onsi/gomega"
)
@yujiorama
yujiorama / .gitconfig
Created December 6, 2021 22:58
my-gitconfig
[color]
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
[core]
excludesFile = ~/.gitignore
autocrlf = input
filemode = false
@yujiorama
yujiorama / awscli.sh
Last active August 27, 2021 08:28
utility functions
# usage: aws-s3-bucket-delete [bucket-name]
# desc: disable(suspend) versioning for [bucket-name], delete all objects in [bucket-name], delete [bucket-name]
function aws-s3-bucket-delete() {
local bucket
bucket="$1"
if [[ -z "${bucket}" ]]; then
return 1
fi
if ! command -v aws >/dev/null 2>&1; then
return 1
@yujiorama
yujiorama / monorepo-vs-polyrepo.md
Last active May 2, 2021 05:42
joelparkerhenderson / monorepo_vs_polyrepo

joelparkerhenderson/monorepo_vs_polyrepoの粗訳です。

Monorepo vs. polyrepo

Objective

モノリポは多数のプロジェクトを1つのリポジトリに入れる方針。

ポリリポ(マルチリポ、メニーリポ)は1つのプロジェクトを1つのリポジトリに入れる方針。

@yujiorama
yujiorama / LineShrink.groovy
Last active April 22, 2021 07:16
oneliner
//
// usage:
// groovy LineShrink.groovy <target.java>
// java -jar ~/.m2/repository/org/codehaus/groovy/groovy/2.5.8/groovy-2.5.8.jar LineShrink.groovy <target.java>
//
def input = new File(args[0])
def methodDefinitionStartPattern = /^\s{4}(public|protected|private)?\s{1,2}[a-zA-Z]{1}[^\s\(\)]+\s*[a-zA-Z]{1}[^\s\(\)]+\(.*$/
def methodDefinitionEndPattern = /^\s{4}\}$/
def inMethodDefinition = false
@yujiorama
yujiorama / guide.md
Created April 14, 2021 23:56
執筆ガイドメモ
@yujiorama
yujiorama / Dockerfile
Last active October 21, 2019 00:37
java dynaimc cds in container
FROM openjdk:12-jdk AS base
ENV SDKMAN_DIR=/usr/local/sdkman
WORKDIR /myapp
RUN set -x \
&& yum update -y \
&& yum install -y ca-certificates curl zip unzip sed binutils which \
&& curl -fsSL https://get.sdkman.io | bash \