Skip to content

Instantly share code, notes, and snippets.

View tex2e's full-sized avatar
🕶️
Ready to engage

Mako tex2e

🕶️
Ready to engage
View GitHub Profile
import io # バイトストリーム操作
import textwrap # テキストの折り返しと詰め込み
import re # 正規表現
import shutil # ターミナル幅の取得
from metatype import Type, List, ListMeta
import dataclasses
# TLSメッセージの構造体を表すためのクラス群
# 使い方:
@tex2e
tex2e / docker-compose.yml
Last active April 29, 2023 07:43
GROWI + Drow.io (Local)
version: '3'
services:
app:
build:
context: .
dockerfile: ./Dockerfile
ports:
- 3000:3000
links:
@tex2e
tex2e / doc.md
Last active March 27, 2023 15:49
get all the files from website

get all the files from website

wget -m -p -E -k -K -np http://site/path/

wget will only follow links, if there is no link to a file from the index page, then wget will not know about its existence, and hence not download it. ie. it helps if all files are linked to in web pages or in directory indexes.

@tex2e
tex2e / write-rejected-file-and-dir.txt
Created December 12, 2021 03:51
Hardening Projectの競技中にSELinuxが書き込みを拒否したファイルとディレクトリの一覧
configure.php
rss_86380e70026c8af52c338ac98e375a04.cache
rss_d9a966ba3c3261d2b4a0bddc2faa12ca.cache
checkout_payment_address.php
account_password.php
login.log
address_book.php
advanced_search_result.php
pub/
.htaccess
@tex2e
tex2e / special-number-field-sieve.sage
Last active November 14, 2020 13:38
[WIP] Special Number Field Sieve (SageMath)
P.<X> = ZZ[]
def select_polynomial(m, d, p):
f = [0] * (d + 1)
f[d] = p // m^d
r = f[d] * m^d
for i in range(d - 1, -1, -1):
f[i] = (p - r) // m^i
r = r + f[i] * m^i
f = P(f)
; Excelの複数行の結合セルに貼り付ける
!+v::
Critical
SetKeyDelay, 0
Loop, parse, clipboard, `n, `r
{
line := StrReplace(A_LoopField, "`t")
Send {F2}%line%{Enter}
}
@tex2e
tex2e / AutoHotkeyScript.ahk
Last active May 17, 2020 07:33
my auto hot key script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; 編集したらスタートアップに再登録する
; 1. AutoHotkeyScript.ahk を右クリックし、Compile Script を実行
; 2. win + R で「shell:startup」を入力
; 3. 常駐しているAutoHotkeyScriptの停止
; 4. AutoHotkeyScript.exe をスタートアップに移動
Write-Host "[INFO] ExecutionPolicy:" (Get-ExecutionPolicy)
Write-Host ""
function prompt {
if (Test-IsAdmin) {
$inputSign = " [admin]> "
} else {
$inputSign = " > "
}

ファイルシステム

Windows

FAT, exFAT

FAT (File Allocation Table) は MS-DOS のファイルシステム。 フロッピーディスク向けに設計されているため、ファイルサイズやファイル名などに制限がある。 FATの制限を大幅に拡張したファイルシステムが exFAT である。

@tex2e
tex2e / vb.md
Last active April 12, 2020 03:16

VB.NET

入出力

Console.WriteLine("Hello, world!")
Console.Write("Test")
str = Console.ReadLine()