Skip to content

Instantly share code, notes, and snippets.

View syuchan1005's full-sized avatar
🌊
Hunting job

Shuichi Sato syuchan1005

🌊
Hunting job
View GitHub Profile
@syuchan1005
syuchan1005 / README.md
Last active August 30, 2023 13:47
Script to convert Unifi device topology map to drawio
@syuchan1005
syuchan1005 / nginx-proxy_to_traefik.patch
Last active May 23, 2023 11:05
Create labels for traefik proxy v2.10 routing from nginx-proxy ENV
diff --git a/pkg/provider/docker/docker.go b/pkg/provider/docker/docker.go
index 0516620ce..488624047 100644
--- a/pkg/provider/docker/docker.go
+++ b/pkg/provider/docker/docker.go
@@ -401,7 +401,7 @@ func parseContainer(container dockertypes.ContainerJSON) dockerData {
}
if container.Config != nil && container.Config.Labels != nil {
- dData.Labels = container.Config.Labels
+ dData.Labels = parseLabels(container)
@syuchan1005
syuchan1005 / Slider.vue
Last active May 2, 2018 16:08
Its like iOS power slider (or win10 setting toggle)
<template>
<div class="slider" :style="sliderStyle" ref="slider">
<div class="base" :style="baseStyle">
<div class="text" :style="textStyle">{{ this.text }}</div>
<div class="thumb" :style="thumbStyle"
@mousedown="mouseDown" @touchstart="touchStart" @touchend="touchEnd" @touchcancel="touchCancel"></div>
</div>
</div>
</template>
@syuchan1005
syuchan1005 / docker-compose.yml
Last active April 14, 2018 14:34
Jetbrains Hub & Upsource & YouTrack & Teamcity(server, agent, db(mysql)) compose file. (need jwilder/nginx-proxy and jrcs/letsencrypt-nginx-proxy-companion container)
# after starting
# run-cmd: sudo chown -R 13001:13001 Hub/ TeamCity/ Upsource/ YouTrack/
version: "3"
services:
hub-server:
image: jetbrains/hub:2018.1.9156
volumes:
- ./Hub/data:/opt/hub/data
- ./Hub/conf:/opt/hub/conf
@syuchan1005
syuchan1005 / Brainfuck.js
Created March 21, 2018 02:49
演算子指定可能なBrainfuckインタプリタ
class Brainfuck {
constructor() {
this.functions = {
incrementPointer: () => {
this.ptr += 1;
if (this.debug) this.write('>', this.ptr);
}, // '>'
decrementPointer: () => {
this.ptr -= 1;
if (this.ptr < 0) this.ptr = 0;
@syuchan1005
syuchan1005 / test.js
Created March 15, 2018 11:01
Youtube subtitle view (run addLyrics() function)
[
'https://unpkg.com/codemirror@5.35.0/lib/codemirror.js',
'https://code.jquery.com/jquery-3.3.1.min.js',
].forEach(url => {
const script = document.createElement('script');
script.src = url;
document.head.appendChild(script);
});
[
@syuchan1005
syuchan1005 / ESP8266IRSendServer.ino
Last active July 15, 2018 04:03
ESP8266を使用してHTTPリクエストでirsendする
/*
ESP8266のIPのserverPortにリクエストを送信して下さい。
(IPはSerialで出力しています)
リクエスト:
method: POST
URL: <ESP8266'sIP>:<serverPort>
Header: {
Content-Type: application/json
}
Body: "{
@syuchan1005
syuchan1005 / My Emoji Commit.md
Last active November 12, 2018 13:34
自分がコミット時に使う絵文字一覧
絵文字 文字列 意味
🎨 art コードのフォーマットや構造にテコ入れ
🚀 rocket パフォーマンスを改善
✏️ pencil2 ドキュメントを書いた時
🚧 construction 作業中
heavy_plus_sign 機能を追加,完成
heavy_minus_sign 機能を削除
🔈 speaker ログを追加
🔇 mute ログを削除
@syuchan1005
syuchan1005 / NBTFile.java
Created November 19, 2016 09:21
Convert .nbt file generated by structure block
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.ToString;
import org.bukkit.Bukkit;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@syuchan1005
syuchan1005 / JButtonTabbedPane.java
Last active September 10, 2016 14:25
某ブラウザのようにTabを閉じたり開いたりするボタンを追加します。
import com.sun.istack.internal.NotNull;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
* Created by syuchan on 2016/09/10.
*/