Skip to content

Instantly share code, notes, and snippets.

View gnh1201's full-sized avatar
๐Ÿ‰
Your Watermelon OPEN UP!

Namhyeon, Go gnh1201

๐Ÿ‰
Your Watermelon OPEN UP!
View GitHub Profile
@gnh1201
gnh1201 / video-trancoding-mastodon.md
Last active July 20, 2024 09:51
How to accelerate video trancoding (FFmpeg) in Mastodon

How to accelerate video trancoding (FFmpeg) in Mastodon

Let's build a remote video transcoder (FFmpeg) for Mastodon!

This post may be outdated. Please check https://github.com/gnh1201/topic-activitypub/blob/main/ffmpeg.md

Why?

Whenever there were incidents or similar events on X (formerly, Twitter), such as on July 1st, the Sidekiq queue in Mastodon would expand, resulting in latency exceeding 10 hours. However, no matter how many photos or videos were being exchanged, it seemed unreasonable in a network where text communication was the primary focus. Eventually, when I disabled all multimedia processing-related features, the latency dropped to zero.

Before following this tutorial

@gnh1201
gnh1201 / rqlite.env
Created June 12, 2023 07:44
rqlite with systemd
INTERFACE=venet0
NODE_ID=1
HTTP_PORT=2001
RAFT_PORT=2002
JOIN=
@gnh1201
gnh1201 / index.php
Created March 24, 2023 08:39
Extract all environment data from PHP runtime
<?php
// Extract all environment data from PHP runtime
// Go Namhyeon <[email protected]>
echo "Extracting...<br/><br/>";
$extracted_data = array();
// Extracting all defined functions
echo "Extracting all defined functions...<br/><br/>";
@gnh1201
gnh1201 / vault.repo
Last active March 16, 2023 20:20
CentOS vault (6.10) repo file example
# wget [this file URL]
# mv /etc/yum.repos.d /etc/yum.repos.d.old
# mkdir /etc/yum.repos.d
# cp vault.repo /etc/yum.repos.d/
# yum clean all
# yum update
[Catswords-C6.10-base]
name=Catswords-CentOS-6.10 - Base
baseurl=http://repo.catswords.com/centos-vault/6.10/os/$basearch/
@gnh1201
gnh1201 / _badbots.conf
Last active September 13, 2022 09:25
nginx _badbots.conf
map $http_user_agent $badbots {
~*(Slurp) 1;
~*([wW]get) 1;
~*(LinkedInBot) 1;
~*(Python-urllib) 1;
~*(python-requests) 1;
~*(aiohttp) 1;
~*(httpx) 1;
~*(libwww-perl) 1;
~*(httpunit) 1;
@gnh1201
gnh1201 / set-up-chromium-keys.md
Last active August 30, 2022 11:17 — forked from cvan/set-up-chromium-keys.md
Launch Chromium with API Keys on Mac OS X and Windows

Sometimes you need to use API Keys to use things like the Speech API. And then you Google a bit and follow all the instructions. But the Chromium Project's API Keys page does a not-so-great of explaining how to do this, so I will.

  1. Download Chromium.
  2. You'll notice a yellow disclaimer message appear as a doorhanger: Google API Keys are missing. Some functionality of Chromium will be disabled. Learn More.
  3. Clicking on that link takes you to the confusing API Keys docs page.
  4. If you aren't already, subscribe to the [email protected] mailing list. (You can just subscribe to the list and choose to not receive any mail. FYI: the Chromium project restricts the APIs to those subscribed to that group - that is, Chromium devs.)
  5. Make sur
@gnh1201
gnh1201 / api.tistory.us.txt
Created August 25, 2022 03:35
api.tistory.us honeypot
172.70.222.28 - - [25/Aug/2022:00:18:24 +0900] "GET /entry.php HTTP/1.1" 200 9 "http://www.yega.co.kr/index.php" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
143.92.32.36 - - [25/Aug/2022:00:45:51 +0900] "GET /v82991.html HTTP/1.1" 404 199 "https://m.sm.cn/s?q=www.zkhyy.com&from=smor&safe=1&snum=0" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 YisouSpider/5.0 Safari/537.36"
172.70.233.44 - - [25/Aug/2022:00:56:21 +0900] "GET /entry.php HTTP/1.1" 200 9 "http://kdy.raonweb.com/m/bbs/board.php?bo_table=music&wr_id=2" "mozilla/5.0 (linux; android 7.0;) applewebkit/537.36 (khtml, like gecko) mobile safari/537.36 (compatible; petalbot;+https://webmaster.petalsearch.com/site/petalbot)"
172.68.118.130 - - [25/Aug/2022:01:36:48 +0900] "GET /entry.php HTTP/1.1" 200 9 "http://www.dongha.net/index.php" "Mozilla/5.0 (compatible; SEOkicks; +https://www.seokicks.de/robot.html)"
172.68.118.130 - - [25/Aug/2022:01:44:59 +0900] "GET /entry.php
@gnh1201
gnh1201 / obs_twitch_chat.css
Created April 1, 2022 09:25 — forked from Bluscream/obs_twitch_chat.css
Twitch chat transparent popout for OBS
/*
Twitch chat browsersource CSS for OBS
Just set the URL as https://www.twitch.tv/%%TWITCHCHANNEL%%/chat?popout=true
And paste this entire file into the CSS box
Original by twitch.tv/starvingpoet modified by github.com/Bluscream
General Settings
*/
body {
color: #FFFFFF!important;
@gnh1201
gnh1201 / howtofix.md
Last active June 21, 2025 22:45
How to fix "can not open access to console the root account is locked"

How to fix "can not open access to console the root account is locked"

I recently experienced this problem, but I only had answers that did not help. Then, I was able to get a hint from the short opinion of the Linux Forum.

This problem is related to the change of the drive. If it is not properly reflected in /etc/fstab, such an error may occur.

  1. Download SystemRescueCD and make a bootdisk: https://www.system-rescue.org/

  2. FDISK and MOUNT

@gnh1201
gnh1201 / Program.cs
Created November 26, 2021 08:54
Program.cs
using System;
using System.Collections.Generic;
using System.IO;
namespace SomethingWrong
{
class Program
{
static char[] key = new char[] {
(char)0x46, (char)0x75, (char)0x63, (char)0x6B, (char)0x4D, (char)0x69,