Skip to content

Instantly share code, notes, and snippets.

View cordx56's full-sized avatar
💊

Yuki Okamoto cordx56

💊
View GitHub Profile
@cordx56
cordx56 / auth.py
Created August 15, 2024 10:30
Googleカレンダーを一回全部削除して、icsをインポートした後に全部の予定の公開設定を変更するPythonコード
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@cordx56
cordx56 / cloudflare_ddns.py
Last active January 26, 2023 19:48
Router tools
#!/usr/bin/env python3
import json
import os
import sys
import requests
CLOUDFLARE_API_BASE = "https://api.cloudflare.com/client/v4"
def get_public_ipv4():
@cordx56
cordx56 / Dockerfile
Last active February 22, 2021 21:44
Docker files for factorio server
FROM debian:buster-slim
RUN apt update && \
apt install -y curl xz-utils && \
curl -LO https://factorio.com/get-download/1.1.25/headless/linux64 && \
tar Jxvf linux64 && \
apt remove -y curl xz-utils
WORKDIR /app
@cordx56
cordx56 / calc.rs
Created July 14, 2020 15:15
calculator written in Rust with parser combinator framework nom
extern crate nom;
use nom::{
IResult,
character::complete::{
multispace0,
char,
digit1,
},
branch::{
version: "3"
services:
zabbix_appliance:
build: ./zabbix-docker/zabbix-appliance/alpine
volumes:
- ./dbdata:/var/lib/mysql
- ./alertscripts:/usr/lib/zabbix/alertscripts
ports:
- 80:80
- 10050:10050

NAS(RAID10, Btrfs) 復旧メモ

概要

NASとして利用しているNETGEAR RN314が今年の4月に急に機能しなくなった1。 調べてみたところ、起動してしばらくするとbtrfs-transactiプロセスがリソースを食い潰し、一切アクセスが不可能な状態になっている。 NAS単体でどうにかできないかと試行錯誤したがどうにも復旧できなかったため、コンピュータに直接HDDを接続することで回復を試みた。

コンピュータに接続

SATAケーブルを利用してNASに利用していた全てのHDDをコンピュータに接続する。

Footnotes

  1. 余談ですが、NASを使い始めるとNASが生活に欠かせなくなってくるため、機能してない間はなかなかしんどかったです……

Keybase proof

I hereby claim:

  • I am cordx56 on github.
  • I am cordx56 (https://keybase.io/cordx56) on keybase.
  • I have a public key whose fingerprint is 5B0B 90ED B3FB CD9C C48C E8D3 D227 C7CF 8AC5 C8F7

To claim this, I am signing this object:

@cordx56
cordx56 / Dockerfile
Last active September 13, 2020 09:34
Docker files for minecraft server
FROM openjdk:11.0.3-jre-slim-stretch
RUN apt-get update && apt-get install -y curl
RUN curl -o /server.jar https://launcher.mojang.com/v1/objects/f02f4473dbf152c23d7d484952121db0b36698cb/server.jar
WORKDIR /minecraft
ENTRYPOINT ["/usr/bin/java", "-Xmx1024M", "-Xms1024M", "-jar", "/server.jar"]
CMD ["nogui"]
@cordx56
cordx56 / Pipfile
Created April 23, 2019 15:46
お手軽Word2Vec
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
gensim = "*"
paramiko = "*"
@cordx56
cordx56 / Pipfile
Last active April 8, 2019 04:46
Get student id from SIT student id card using Felica reader and write list.txt & LCD display
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
nfcpy = "*"
pip = "==18.0"
"smbus2" = "*"