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 July 21, 2024 00:21
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.

@greymd
greymd / sudo新一.md
Last active July 20, 2024 05:02
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 May 19, 2024 15:40
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 <mohemohe@ghippos.net>
// @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 February 26, 2024 05:51
女子中学生チケット詐欺事件

criminal_jc

@retasretas
retasretas / cron.python
Created February 12, 2017 11:16
SlackにDLsiteとDMM同人の販売本数をスクレイピングして投稿するスクリプト
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import scraperwiki
import requests
import re
from pyquery import PyQuery as pq
# 3rd party library
try: