Skip to content

Instantly share code, notes, and snippets.

@ecormaksin
ecormaksin / rsync_custom.sh
Last active October 5, 2023 02:12
rsyncによるフォルダー間のコピー(コピー先のみに存在するものは削除)
#!/usr/bin/env bash
cd `dirname $0`
if [ $# -gt 3 ]; then
echo "呼出時の引数: <コピー元ディレクトリー パス> <コピー先ディレクトリー パス> (<除外パターンファイルのパス>)"
exit 1
fi
if [ $# -lt 2 ]; then
@ecormaksin
ecormaksin / mysql_get_users.sql
Created June 13, 2023 01:56
MySQLユーザー一覧
select
Host
, user
, PLUGIN
, AUTHENTICATION_STRING
, PASSWORD_EXPIRED
from mysql.user;
@ecormaksin
ecormaksin / convert_file_to_utf8-lf.sh
Created June 8, 2023 01:04
change file encoding to utf8-lf
#!/bin/bash
if [ $# -gt 2 -o $# -lt 1 ]; then
echo "Usage: $0 TARGET_FOLDER_PATH [TARGET_FILE_REGEX]"
exit 1
fi
TARGET_FOLDER_PATH=$1
if [ $# -eq 1 ]; then
@ecormaksin
ecormaksin / gist:336a687667a76b7c0ba9fa5d08e0567c
Created March 17, 2023 06:56
T-SQL SQL Serverでテーブル定義を取得するクエリ
-- https://learn.microsoft.com/ja-jp/sql/relational-databases/tables/view-the-table-definition?view=sql-server-ver16#TsqlProcedure
SELECT
s.name AS schema_name
, t.name AS table_name
, c.*
, st.name AS [システム型]
, ut.name AS [ユーザー定義型]
FROM
sys.columns AS c
INNER JOIN sys.tables AS t ON
@ecormaksin
ecormaksin / gist:97773ad298aae745b2444c9d3952db98
Created January 31, 2023 02:31
cmderのプロンプト文字を変更する
# %USERPROFILE%\scoop\apps\cmder\current\config\cmder_prompt_config.lua
# 22行目
prompt_lambSymbol = "$"
@ecormaksin
ecormaksin / add_local_bin_to_path.sh
Created January 1, 2023 11:53
add .local/bin to $PATH
LOCAL_BIN_DIR=$HOME/.local/bin
echo $PATH | grep $LOCAL_BIN_DIR >/dev/null
if [ $? -ne 0 ]; then
export PATH=$LOCAL_BIN_DIR:$PATH
fi
@ecormaksin
ecormaksin / gist:1caca89d4f1010500a2039e744fda670
Created October 22, 2022 07:06
change ghq root and set git global user
mkdir -p ~/ws/ghq
git config --global ghq.root '~/ws/ghq'
@ecormaksin
ecormaksin / sources.list
Created April 24, 2022 04:19
/etc/apt/sources.list for Fossadog64 (japan mirror)
# Fossadog repo
deb https://debiandog.github.io/FossaDog/Packages-amd64/ ./
deb http://jp.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal main restricted
deb http://jp.archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://jp.archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb http://jp.archive.ubuntu.com/ubuntu/ focal universe
@ecormaksin
ecormaksin / wine_tips.md
Last active April 10, 2022 02:49
Wine関連

Wine関連メモ

  • 参考URL

  • パッケージのインストール

    sudo apt -y install wine64 winetricks
@ecormaksin
ecormaksin / intellij-idea.desktop
Last active May 3, 2022 15:14
UbuntuでIntelli IDEAのデスクトップショートカットを作成する
[Desktop Entry]
Categories=TextEditor;Development;IDE;
Type=Application
Terminal=false
Icon[ja]=/opt/idea/bin/idea.png
Name[ja]=IntelliJ IDEA
Exec=/opt/idea/bin/idea.sh
Icon=/opt/idea/bin/idea.png
# save as '/usr/share/applications/intellij-idea.desktop'