I hereby claim:
- I am MagicNAT on github.
- I am magicnat (https://keybase.io/magicnat) on keybase.
- I have a public key whose fingerprint is 1846 9E41 8F1F C388 0D4C DCD1 6EFA 43E6 ABDE 2194
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
from pyrogram import Client | |
from pyrogram.api import types | |
import time | |
def update_handler(client, update, users, chats): | |
if isinstance(update, types.UpdateUserStatus): | |
print("%d,%d\n" % (time.time(), update.user_id)) |
#!/bin/bash | |
filter_log () { | |
next=0 | |
while read line; do { | |
IFS=, read -ra dates <<< "$(cut -d',' -f1 <<< "$line")" | |
date=${dates[0]} | |
[ $date -gt $next ] && { | |
echo "$date" | |
read m s <<< $(gdate -d @$date +"%M %S") |
#!/bin/bash | |
[ -z "$2" ] && echo "usage: $0 <query> <ns> [timeout=5]" && exit 1 | |
{ sleep 1; dig $1 @$2 > /dev/null; } & | |
timeout ${3:-5} tcpdump -nvi any src port 53 and src $2 2>&1 \ | |
| grep '>' \ | |
| tail -n1 \ | |
| cut -d':' -f2 \ |
# for org: | |
query=orgs/nat-lab | |
# for user: | |
# query=users/magicnat | |
curl -s https://api.github.com/$query/repos | jq -cr '.[] .full_name' | while read r; do curl -s https://api.github.com/repos/$r/license | jq -cr '.license .spdx_id'; done | sort | uniq -c |
// ==UserScript== | |
// @name osu!pp | |
// @namespace http://nat.moe/ | |
// @version 0.1 | |
// @description show FC PP on osu info page. | |
// @author NAT | |
// @include /^http.*:\/\/osu.ppy.sh/[sb]?\/.*$/ | |
// @grant none | |
// ==/UserScript== |
#!/bin/bash | |
# bot configuration | |
TOKEN='' | |
URL='https://api.telegram.org/bot'$TOKEN | |
INTV=1 | |
# log: logger | |
# usage: log <loglevel> <message> | |
# loglevel: integer, 1 to 3, INFO/DEBUG/VERBOSE |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Simple script allows you to chat as a bot in Telegram. | |
# based on topkecleon/telegram-bot-bash. | |
# dependencies: python3, python-telegram-bot (pip3 install python-telegram-bot); | |
# tmux | |
TOKEN="" | |
URL='https://api.telegram.org/bot'$TOKEN | |
MSG_URL=$URL'/sendMessage' | |
ACTION_URL=$URL'/sendChatAction' | |
PHO_URL=$URL'/sendPhoto' |
server | |
{ | |
listen 443; | |
listen [::]:443; | |
server_name zhwiki.example.org; | |
ssl on; | |
ssl_certificate /path/to/ssl/cert.crt; | |
ssl_certificate_key /path/to/ssl/key.pem; |