Skip to content

Instantly share code, notes, and snippets.

View GrapeApple0's full-sized avatar
🍵
にゃーん

Porlam Nicla GrapeApple0

🍵
にゃーん
View GitHub Profile
@GrapeApple0
GrapeApple0 / content.js
Last active December 20, 2022 10:03
Return Twitter Client Info
var parser = new URL(location.href);
async function setClientInfo() {
parser = new URL(location.href);
if (!isNaN(parser.pathname.split('/')[3])) {
const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
fetch('https://api.twitter.com/2/tweets?ids=' + parser.pathname.split('/')[3] + '&tweet.fields=attachments,author_id,context_annotations,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,public_metrics,referenced_tweets,source,text,withheld&expansions=referenced_tweets.id', {
headers: {
'Authorization': 'Bearer $TwitterAPIBearerToken'
}
}).then(function (data) {
@GrapeApple0
GrapeApple0 / example.ap.json
Last active December 27, 2022 04:09
.ap Whois
{
"domain":"example.ap",
"status":"Activa",
"register":"ApolenNic",
"registry":"ApolenNic (http://nic.ap/)",
"address":"2-6 MeinStlet Dublik Apolen",
"email":"webmaster@nic.ap"
}
@GrapeApple0
GrapeApple0 / main.py
Created January 9, 2023 06:01
3hiraganabot.py
isDebug = False
import random
import time
from misskey import Misskey
def genHiraganas():
lst = "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉっゃゅょゎ!?"
word = ""
for i in range(3):
word += lst[random.randrange(0,len(lst))]
return word
@GrapeApple0
GrapeApple0 / del.sh
Last active February 10, 2023 23:51
Auto Misskey Installer
sudo deluser misskey
sudo rm -rf /home/misskey
sudo -u postgres psql postgres -c 'DROP DATABASE misskey;'
sudo -u postgres psql postgres -c 'DROP ROLE misskey;'

Keybase proof

I hereby claim:

  • I am GrapeApple0 on github.
  • I am porlam (https://keybase.io/porlam) on keybase.
  • I have a public key whose fingerprint is 0EED 0BED 3103 D85D BF62 0EF1 F5E7 6EEA E8CB D79D

To claim this, I am signing this object:

@GrapeApple0
GrapeApple0 / main.py
Created February 16, 2024 07:30
AutoSpamFilter
import requests
SERVER = "対象インスタンス"
TOKEN = "トークン"
FILTER_WORDS = ["吹き飛ばしたいワード","てすとほげほげ"]
notes = []
untilId = ""
ban_host = []
for filter_word in FILTER_WORDS:
while True:
param = {'query': filter_word, 'limit': 10, 'i': TOKEN}
@GrapeApple0
GrapeApple0 / main.py
Created February 16, 2024 08:35
AutoSpamBan
import requests
import re
import datetime
SERVER = "対象インスタンス"
TOKEN = "トークン"
meta = requests.post(f'https://{SERVER}/api/admin/meta',
headers={'Content-Type': 'application/json'},
json={'i': TOKEN}, timeout=10).json()
BANNED_SERVER = meta['blockedHosts']
ban_user_list = []
CREATE OR REPLACE FUNCTION base36_decode(encoded_text text)
RETURNS bigint AS $$
declare
k_base constant integer := 36;
k_alphabet constant text := '0123456789abcdefghijklmnopqrstuvwxyz';
v_encoded_arr text[];
v_return_result bigint := 0;
v_interim bigint;
v_index integer;
v_token text;
@GrapeApple0
GrapeApple0 / rdap-cctld.txt
Created June 9, 2024 10:12
cctld rdap server list
{
# NIC Argentina
"ar": "https://rdap.nic.ar/domain/",
# Switch
"ch": "https://rdap.nic.ch/domain/",
"li": "https://rdap.nic.ch/domain/",
# National Academy of Sciences
"cr": "https://rdap.nic.cr/domain/",
"cv": "https://rdap.nic.cv/domain/",
# CoCCA Registry Services
@GrapeApple0
GrapeApple0 / main.py
Created October 8, 2024 13:30
Ban spam by username
import requests
import datetime
import time
SERVER = "example.com"
TOKEN = "EXAMPLETOKEN"
old_ban_host = []
BANNED_SERVER = []
IGNORE_LIST = ["example.com"]
CANDIDATE_LIST = dict()
already_check=False