Skip to content

Instantly share code, notes, and snippets.

View madosuki's full-sized avatar

madosuki madosuki

View GitHub Profile
py -3 -m pip freeze --local | ForEach-Object { py -3 -m pip install -U $($_-split("=="))[0]}
@echo off
set /P DriveName="HDDを指すドライブレターを入力してください: "
robocopy %USERPROFILE%\Documents %DriveName%:\bak\windows\ /MIR /XD "My Music" "My Videos" "My Pictures"
from mastodon import Mastodon
import os.path
import sys
ClientID = ""
TokenF = ""
class FileCheck:
def __init__(self):
self.idExist = False
# conding: utf-8
import sys
import os.path
from mastodon import Mastodon
import appscript
import re
ClientID = "Text FileName"
TokenF = "Text FileName"
@madosuki
madosuki / yamcha.diff
Last active October 2, 2019 08:23
This diff file is patch for "YamCha: Yet Another Multipurpose CHunk Annotator" .
diff -uprN ../yamchaPre/libexec/pkemine.cpp ./libexec/pkemine.cpp
--- ../yamchaPre/libexec/pkemine.cpp 2004-03-13 02:12:13.000000000 +0900
+++ ./libexec/pkemine.cpp 2017-04-26 15:21:36.000000000 +0900
@@ -124,7 +124,7 @@ private:
int pos = projected[i].second;
unsigned int size = transaction[id].size();
for (unsigned int j = pos + 1; j < size; ++j)
- counter[transaction[id][j]].push_back (std::make_pair<unsigned int, int>(id, j));
+ counter[transaction[id][j]].push_back (std::make_pair<unsigned int, int>((const unsigned int)id, (const int)j));
}
[exedit]
width=1280
height=720
rate=30
scale=1
length=67208
audio_rate=44100
audio_ch=2
[0]
start=1
@echo off
set x64="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
set x86="C:\Program Files\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
set mes="コンパイルスタート"
if exist "%x64%" (
goto :compile_x64
) else if exist "%x86%" (
goto :compile_x86
@madosuki
madosuki / tate.py
Last active October 4, 2017 00:36
Python3用。テキストファイルに書かれた文字を縦書きっぽく成形し、クリップボードに入れるだけのプログラムです。
#encoding: utf-8
import sys
import pyperclip as clip
class Vertical:
def __init__(self):
self.size = 0
self.tex = ""
self.count = 0

Keybase proof

I hereby claim:

  • I am madosuki on github.
  • I am madosuki (https://keybase.io/madosuki) on keybase.
  • I have a public key whose fingerprint is 79BF 4E35 F368 EE12 4F1D 2704 A8F1 F14D EB36 B0DF

To claim this, I am signing this object:

type Test struct {
name string
}
func main() {
var buf bytes.Buffer
enc := gob.NewEncoder(&buf)
dec := gob.NewDecoder(&buf)
err := enc.Encode(Test{"Cat"})