Skip to content

Instantly share code, notes, and snippets.

View fliedonion's full-sized avatar

Takahiro KITAHARA fliedonion

View GitHub Profile
@fliedonion
fliedonion / !GIST file list order - summary.md
Last active March 8, 2024 02:27
Understand GIST file list order.
Summary How to control (or Understand) your GIST page's files list order.
Notice not official documentation.
@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 / !javascript in bat file.md
Last active June 10, 2023 14:49
How to Embed Javascript code in Windows Bat File.
Summary One example for embed javascript into windows bat file without any external tools or files.
Env windows node.js jscript
// place this file the path such ends with: ChatServer/server/ChatServer.java
package ChatServer.server;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
@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: