Skip to content

Instantly share code, notes, and snippets.

View jqqqqqqqqqq's full-sized avatar

Curtis Jiang jqqqqqqqqqq

  • Brown University
View GitHub Profile
@jqqqqqqqqqq
jqqqqqqqqqq / settings.json
Created January 23, 2021 18:53
NixOS code-server python debug config
{
"python.pythonPath": "/root/miniconda3/bin/python",
"terminal.integrated.shell.linux": "/run/current-system/sw/bin/conda-shell",
"code-runner.runInTerminal": true,
"python.terminal.activateEnvironment": false,
"code-runner.executorMap": {
"python": "python -u $fullFileName"
},
"python.jediEnabled": false
}
from aiogram import Bot, Dispatcher, types
from aiogram.utils.markdown import quote_html
import asyncio
TOKEN = ''
MAIN_GRP = -1
MAIN_GRP_LNK = 'https://t.me/111'
DISSCUSSION_GRP = -1
DISSCUSSION_GRP_LNK = 'https://t.me/222'
@jqqqqqqqqqq
jqqqqqqqqqq / main.py
Created April 13, 2020 22:05
telegram @whatismyoptstatusbot opt status lookup
from aiogram import Bot, Dispatcher, types
from aiohttp import ClientSession
from bs4 import BeautifulSoup
import asyncio
import re
async def get_status(receipt_number):
url = 'https://egov.uscis.gov/casestatus/mycasestatus.do'
# changeLocale=&appReceiptNum=YSC1790007419&initCaseSearch=CHECK+STATUS
@jqqqqqqqqqq
jqqqqqqqqqq / add_user.sh
Created July 9, 2019 18:07
Nginx http auth without apache util
#!/bin/bash
# read username
read -p "Username: " username
# read password twice
read -s -p "Password: " password
echo
read -s -p "Password (again): " password2
@jqqqqqqqqqq
jqqqqqqqqqq / bird2 systemd
Created September 6, 2018 18:47
bird2 systemd from arch linux
[Unit]
Description=BIRD routing daemon
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/bird
ExecReload=/usr/bin/birdc configure
ExecStop=/usr/bin/birdc down
@jqqqqqqqqqq
jqqqqqqqqqq / openwrt bird
Created July 31, 2018 13:27
bird2 init.d script with restart option
#!/bin/sh /etc/rc.common
# Copyright (C) 2010-2017 OpenWrt.org
USE_PROCD=1
START=70
BIRD_BIN="/usr/sbin/bird"
BIRD_CONF="/etc/bird.conf"
BIRD_PID_FILE="/var/run/bird.pid"
function catz # cat without '#' lines
cat $argv | grep -v "^#"
end
@jqqqqqqqqqq
jqqqqqqqqqq / kagami3.py
Created September 10, 2017 07:52 — forked from blueset/kagami3.py
Utsushidasu Kagami ver 3
import telegram
import telegram.ext
import re
# Utsushidasu Kagami Bot v3
# With sticker removal and off-topic transfer.
# License: MIT
"""
Copyright 2017 Eana Hufwe