Skip to content

Instantly share code, notes, and snippets.

@osapon
osapon / gist:38ed277560643f4b03e69b58079f5729
Last active March 5, 2024 01:11
spam送信元SNS管理者への連絡状況記録
メール不達
https://cmm.fyi/about
https://cuyes.mooo.com/about
送信済(未対応・返答無し)
https://9kb.me/public/local (メール不達・サーバ運営会社へ連絡)
https://nasface.cz/public/local (メール不達・サーバ運営会社へ連絡)
https://i.transmit.love/public/local (返答無し・サーバ運営会社へ連絡)
https://niederbayern.social/public/local (返答無し・サーバ運営会社へ連絡)
https://bigballchunkyverse.online/public/local
@osapon
osapon / size.sql
Created November 8, 2019 04:57
PostgreSQL DB Garbage raito
SELECT pg_database_size('notestock') AS db_size -- Any DB Name
, ROUND(100 * SUM(
CASE (a.n_live_tup + a.n_dead_tup) WHEN 0 THEN 0
ELSE c.relpages * (a.n_dead_tup / (a.n_live_tup + a.n_dead_tup)::numeric)
END
) / SUM(c.relpages), 2) AS garbage_raito
FROM pg_class AS c
JOIN pg_stat_all_tables AS a ON(c.oid = a.relid)
WHERE relpages > 0
@osapon
osapon / b.md
Created October 24, 2020 08:17
自治体役所同士の近い順(区役所除く)

SELECT

距離(m)
150 石垣市役所 美崎町14 map 竹富町役場 石垣市美崎町11 map
154 三島村役場 鹿児島市名山町12-18 map 十島村役場 鹿児島市泉町14-15 map
408 鹿児島市役所 山下町11-1 map 三島村役場 鹿児島市名山町12-18 map
508 鹿児島市役所 山下町11-1 map 十島村役場 鹿児島市泉町14-15 map
606 湯浅町役場 大字湯浅1055-9 map 広川町役場 大字広1500 map
873 春日市役所 原町3-1-5 [map](https://www.google.co
@osapon
osapon / a.md
Last active October 24, 2020 08:15
自治体役所同士の近い順(区役所含む)

SELECT

距離(m)
0 相模原市役所 中央区中央2-11-15 map 相模原市中央区役所 中央2-11-15 map
0 堺市役所 堺区南瓦町3-1 map 堺市堺区役所 南瓦町3-1 map
0 浜松市役所 中区元城町103-2 map 浜松市中区役所 元城町103-2 map
0 新潟市役所 中央区学校町通1番町602-1 map 新潟市中央区役所 学校町通1番町602-1 map
0 岡山市役所 北区大供一丁目1-1 map 岡山市北区役所 大供一丁目1-1 map
51 さいたま市役所 浦和区常盤6-4-4 [map](https://www.google.
@osapon
osapon / netlify.toml
Last active January 27, 2020 03:42
netlify 503 page setting
[[redirects]]
from = "/*"
to = "/mente.html"
status = 503
force = true
console.log("%cストップ!", "color: #88F; font-size: 400%; font-weight:bold;text-shadow: rgb(0, 0, 0) 3px 0px 0px, rgb(0, 0, 0) 2.83333px 0.983333px 0px, rgb(0, 0, 0) 2.35px 1.85px 0px, rgb(0, 0, 0) 1.61667px 2.51667px 0px, rgb(0, 0, 0) 0.7px 2.91667px 0px, rgb(0, 0, 0) -0.283333px 2.98333px 0px, rgb(0, 0, 0) -1.25px 2.73333px 0px, rgb(0, 0, 0) -2.06667px 2.16667px 0px, rgb(0, 0, 0) -2.66667px 1.36667px 0px, rgb(0, 0, 0) -2.96667px 0.416667px 0px, rgb(0, 0, 0) -2.95px -0.566667px 0px, rgb(0, 0, 0) -2.6px -1.5px 0px, rgb(0, 0, 0) -1.96667px -2.26667px 0px, rgb(0, 0, 0) -1.11667px -2.78333px 0px, rgb(0, 0, 0) -0.133333px -3px 0px, rgb(0, 0, 0) 0.85px -2.88333px 0px, rgb(0, 0, 0) 1.75px -2.43333px 0px, rgb(0, 0, 0) 2.45px -1.73333px 0px, rgb(0, 0, 0) 2.88333px -0.833333px 0px;");
console.log("もし誰かにここにコピペしろと言われたなら、あなたは11割騙されています。");
console.log("%cここに何かを貼り付けたら悪意のあるユーザーにあなたのアカウントを乗っ取られるかもしれません。", "color: red; font-weight:bold;");
@osapon
osapon / gist:2fd6ef8b7f5f1fee63357eda42a4daad
Created January 16, 2019 11:14
punycodeから第一水準漢字あたりを出した。
1342 xn--bbk ま
1349 xn--bbr 函
1350 xn--bbs 囆
1351 xn--bbt 宏
1352 xn--bbu 恘
1353 xn--bbv 攡
1354 xn--bbw 槪
1355 xn--bbx 溳
1356 xn--bby 獼
1357 xn--bbz 硅
@osapon
osapon / mastodon.user.css
Last active March 13, 2018 08:05
Mastodonの2.3.0とかで動くようにしているcss。トゥートの間隔を詰めて、unarist氏の固定トゥート圧縮をさらに改造
.drawer {
overflow : visible ;
width : 25% !important ;
height : 400px !important ;
}
.emoji-dialog {
z-index : 1 !important ;
position : fixed !important ;
@osapon
osapon / gist:2222cd8952190ad4c9694f6f0c9bbe38
Last active September 28, 2017 02:18
Bloggerで記事毎の共有ボタンに「Mastoshare」を並べるスクリプト。デザインによってクラスの調整は必要だと思う。
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
$('.blog-posts > .date-outer').each(function(idx,obj) {
var title = $('.post-title',obj).text();
$('.post-share-buttons',obj).append('<a href="https://mastoshare.net/post.php?text=' + encodeURIComponent(title) + '" onclick="window.open(this.href, \'\', \'width=500,height=400\'); return false;"><img src="https://mastoshare.net/img/toot.svg" width="75" height="20"></a>');
});
});
</script>