Skip to content

Instantly share code, notes, and snippets.

View fliedonion's full-sized avatar

Takahiro KITAHARA fliedonion

View GitHub Profile
@fliedonion
fliedonion / InsertIgnoreUniqErrorManualTxService.java
Created December 20, 2022 17:29
Spring Boot Insert with manual transaction to Ignore DuplicateKeyException Example
package net.case_of_t.egpostgresmybatis.insertIgnoreUniqErrorDomain;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.DefaultTransactionDefinition;
@fliedonion
fliedonion / SampleCodeForm.cs
Last active December 20, 2022 10:59
JSON.NET Deserialize null string to string.Empty.
using JsonConvertOptionForm.Entity;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
@fliedonion
fliedonion / seafile-ignore.txt
Last active May 7, 2022 17:37
My Seafile ignore
# put this file your ROOT of share folder.
## comments below are tips or examples
# # a regular file (put both)
# test-file
# **/test-file
#
# # a dir (put both)
# test-dir/
# **/test-dir/
#
@fliedonion
fliedonion / settings.xml
Created January 17, 2022 16:36
Maven settings.xml example to configure Local directory / Network directory as Repository.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>my-local-repo</id>
<repositories>
<repository>
<id>network-drive-repo</id>
<name>Test Local Repository</name>
<!-- copy %USERPROFILE%\.m2\repository as following directory -->
@fliedonion
fliedonion / !jun-app_apache_container.md
Last active November 29, 2020 12:59
try to shrink centos container image by jun-app.

以下で紹介されていたコンテナのサイズが小さくなればいいなとためしてみた。

https://jun-app.com/laravel-on-docker/

単純にRUNを結合した飲み。 うちだとsystemdなコンテナは使えないので (Volumeのマウント的にも)、動作確認はしていない。

インストールパッケージを参考にさせてもらって別のベースイメージでつくってみようかな(独り言)

結果から:

@fliedonion
fliedonion / test-pxssh.py
Last active November 14, 2020 17:26 — forked from jquast/test-pxssh.py
Fork for Update source for python3 and my pxssh testing.
##!/usr/bin/env python3
import os
import sys
from pexpect.pxssh import pxssh as PXSSH
import getpass
class Debug_PXSSH(PXSSH):
def sendline(self, input='') -> int:
@fliedonion
fliedonion / docker-compose.yml
Created July 9, 2020 17:57
rocket.chat 3.4.1 / let's chat docker-compose sample
version: "3"
services:
letschat:
image: sdelements/lets-chat
# image: lets-chat:2020-07-08
links:
- mongo
ports:
- 8080:8080
@fliedonion
fliedonion / !selenium_edge_osx.py
Last active November 29, 2023 08:38
selenium with Microsoft Edge on Mac OS X.
# coding: utf-8
from selenium import webdriver
edge_options = {
"executable_path": "/Users/takahiro/selenium-webdrivers/edge-83/msedgedriver",
# ofcourse change path to driver you downloaded.
"capabilities": {
"platformName": 'mac os x', # I get this from Chrome driver's capabilities
# "os" : "OS X", # also ok.
}
@fliedonion
fliedonion / appveyor.yml
Last active February 17, 2020 15:06
appveyor.yml for build library
# AppVeyor.yml for Zipped files to XCopy Deploy.
# - Require VS2013 ($env:MSBUILD_EXE)
# - Require 7Zip ($env:szip)
# - "C:\opt\nuget3.4\appveyor_nugetconfig\nuget.config"
# - C:\opt\nuget3.4\nget.exe
# version: 1.0.{build}
# 必要に応じてAssemblyInfoパッチなども行う。このymlを共通で使うならここでバージョンしない方が良いと思う。
configuration: Release
@fliedonion
fliedonion / karabiner.pc-jis-sample.json
Last active April 28, 2019 16:58
karabiner-elements: JIS PCキーボードでVMware fusion除外デバイス指定も絡めたwin-alt置換、caps-rCtrl化、無変換変換かな-英数かな化サンプル
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {