Skip to content

Instantly share code, notes, and snippets.

@ecormaksin
ecormaksin / template.html
Last active July 1, 2024 12:22
HTMLファイルの最小テンプレート
<!DOCTYPE html>
<html lang="ja-JP">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>the simplest HTML template</title>
<link href=".css" rel="stylesheet" type="text/css">
<script src="script.js" defer></script>
</head>
@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'
@buzztaiki
buzztaiki / kensington_expert_mouse_wireless_silent_micro_switch.md
Last active December 9, 2023 09:03
Kensington Expert Mouse Wireless のボタンを静音化する

Kensington Expert Mouse Wireless のボタンを静音化する

↓こいつのスイッチを静音化する。

https://www.kensington.com/ja-jp/p/製品/コントロール/トラックボール/エキスパートマウス-ワイヤレストラックボール/

元々のスイッチは D2F-01F 互換っぽい形をした Kailh のスイッチ。Redditのスレッド によると KH-PS1704-42 との事。

電子工作は子供の頃にやった以来ほとんどしてない素人で色々あれかもしれないけど、一応成功している。

GOLANG_BIN_PATH=/usr/local/go/bin
echo $PATH | grep $GOLANG_BIN_PATH >/dev/null
if [ $? -ne 0 ]; then
export PATH=$GOLANG_BIN_PATH:$PATH
fi
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active April 8, 2025 07:50
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@jelovac
jelovac / README.md
Last active May 11, 2025 07:34
Ubuntu Mate 20.04 XRDP setup

Ubuntu Mate 20.04 XRDP setup

Documenting XRDP setup which worked for me on Ubuntu Mate 20.04.

Some parts are taken from: http://c-nergy.be/blog/?p=14093.

Install xrdp

sudo apt install xrdp
SELECT
TABLE_NAME,
COLUMN_NAME
--DATA_TYPE,
--DATA_TYPE_MOD,
--DATA_TYPE_OWNER,
--DATA_LENGTH,
--DATA_PRECISION,
--DATA_SCALE,
--NULLABLE,
sudo ln -s /etc/xrdp/km-00000409.ini /etc/xrdp/km-e0010411.ini
@jeroenr
jeroenr / logback.xml
Created July 25, 2017 19:42
Logback configuration splitting to stdout and stderr
<configuration>
<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
<target>System.err</target>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
@syakuis
syakuis / logback-type.xml
Created June 20, 2017 02:36
Slf4j logback setting sample.
<?xml version="1.0" encoding="UTF-8"?>
<included>
<property name="LOGS_ABSOLUTE_PATH" value="/Users/syaku/develop/egov_mei/logs" />
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOGS_ABSOLUTE_PATH}/mei.all.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>