Skip to content

Instantly share code, notes, and snippets.

View eai04191's full-sized avatar
🦀

y.takahashi eai04191

🦀
View GitHub Profile
@nolanlawson
nolanlawson / scaling_mastodon_down.md
Last active November 17, 2024 16:12
Scaling Mastodon down

Scaling Mastodon down

There is already a guide on scaling your Mastodon server up. This is a short guide on scaling your Mastodon server down.

I.e., maybe you want to run a small instance of <100 active users, and you want to keep your cloud costs reasonable. So you might be running everything on a single machine, with limited memory and CPU. (In my case, I was using a t3.medium instance with 2 vCPUs and 4GB of RAM.) How do you do this?

Note that I'm not a Ruby or Sidekiq expert, and most of this stuff I figured out through trial and error.

@loknop
loknop / writeup.md
Created December 30, 2021 14:59
Solving "includer's revenge" from hxp ctf 2021 without controlling any files

Solving "includer's revenge" from hxp ctf 2021 without controlling any files

The challenge

The challenge was to achieve RCE with this file:

<?php ($_GET['action'] ?? 'read' ) === 'read' ? readfile($_GET['file'] ?? 'index.php') : include_once($_GET['file'] ?? 'index.php');

Some additional hardening was applied to the php installation to make sure that previously known solutions wouldn't work (for further information read this writeup from the challenge author).

I didn't solve the challenge during the competition - here is a writeup from someone who did - but since the idea I had differed from the techniques used in the published writeups I read (and I thought it was cool :D), here is my approach.

@greymd
greymd / sudo新一.md
Last active April 22, 2025 01:14
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:&amp; };: でプロセステーブ

@mohemohe
mohemohe / deny_pom.sh
Last active June 8, 2020 14:20
ユーザー作成スパムをsuspendする
#!/bin/bash
#### require
# curl
# jq
# seq
#### config
# 最後に/を含めない
MASTODON_BASE_URL=https://mstdn.plusminus.io
@kb10uy
kb10uy / model-grabbing-claim.php
Created January 30, 2020 13:10
タイピング速度測定恒例行事
<?php
declare(strict_types=1);
$regices = [
'つかみ取り' => '/あっちで(.+)のつかみ取り/u',
'女性モデル' => '/(.+)女性モデル/u',
'苦情' => '/(.+)という苦情/u',
];
____-------____
__-- --__
/ \
\ _--_ _--_ / あなたはシステム管理者から通常の講習を受けたはずです。
| ,--. ,--. | これは通常、以下の3点に要約されます:
| |()| |()| |
| _______ | #1) 他人のプライバシーを尊重すること。
| \ ||| / |
| `---' | #2) タイプする前に考えること。
@Ishotihadus
Ishotihadus / atr.md
Last active April 2, 2025 12:42
ATR503文元ネタ集

ATR 音素バランス 503 文元ネタ集

判明している音素バランス文の元ネタを集めた。

Subset A

a01: あらゆる現実をすべて自分のほうへねじ曲げたのだ。

「マルサの女 撮影日記」(伊丹十三)(文藝春秋 1987 年 2 月)(c03、g01 と同一)

// ==UserScript==
// @name maud.io NSFW
// @namespace net.ghippos.hide.nsfw.io.maud.mstdn
// @version 1.1
// @description FUCK TWITTER
// @author mohemohe <[email protected]>
// @match https://mstdn.maud.io/*
// @grant none
// ==/UserScript==
@unarist
unarist / mastodon-mstdbg.user.js
Last active February 8, 2021 09:11
Mastodon - Add debug tools to window.mstdbg
// ==UserScript==
// @name Mastodon - Add debug tools to window.mstdbg
// @namespace https://github.com/unarist
// @version 0.5
// @description no description :)
// @author unarist
// @match https://*/web/*
// @require https://unpkg.com/axios/dist/axios.min.js
// @grant none
// @downloadURL https://gist.github.com/unarist/9722831a794b5537dc0f749ee49da55a/raw/mastodon-mstdbg.user.js
@shunirr
shunirr / criminal_jc.md
Last active December 25, 2024 04:13
女子中学生チケット詐欺事件

criminal_jc