Skip to content

Instantly share code, notes, and snippets.

View xjasonlyu's full-sized avatar
🦈
Ripping off codes

Jason Lyu xjasonlyu

🦈
Ripping off codes
  • McMaster University
  • Greater Toronto Area
  • 09:30 (UTC -04:00)
View GitHub Profile
@xjasonlyu
xjasonlyu / coredns
Created July 15, 2019 06:02
alpine-init-service-script
#!/sbin/openrc-run
description="the Coredns DNS server"
pidfile="/run/$RC_SVCNAME.pid"
cfgfile="/etc/$RC_SVCNAME/Corefile"
command="/usr/local/bin/coredns"
command_args="-quiet -conf=$cfgfile"
command_user="nobody"
@xjasonlyu
xjasonlyu / main.c
Last active December 14, 2019 09:13
Simple Student Info Manage System Assignment for HDU Short Term Programing Class
/*
____ ____ ___ __ __ ____
/ ___| / ___| |_ _|| \/ |/ ___|
\___ \ \___ \ | | | |\/| |\___ \
___) | ___) | | | | | | | ___) |
|____/ |____/ |___||_| |_||____/
Created by Jason Lyu on 8/24/19.
*/
@xjasonlyu
xjasonlyu / fuck-cyjc.py
Last active December 14, 2019 09:09
湖南大学创业基础网课平台-刷课脚本-v0.03
#!/usr/bin/env python3
#
__LOGO__ = \
'''
_____ _ _ ____ _ __ ____ __ __ _ ____
| ___|| | | | / ___|| |/ / / ___|\ \ / / | | / ___|
| |_ | | | || | | ' / _____ | | \ V / _ | || |
| _| | |_| || |___ | . \ |_____|| |___ | | | |_| || |___
|_| \___/ \____||_|\_\ \____| |_| \___/ \____| v{!s}
--By xjasonlyu
@xjasonlyu
xjasonlyu / answer.md
Last active December 14, 2019 07:42
USTC hackergame2019 #9-python wp
 ____          _    _                    _____
|  _ \  _   _ | |_ | |__    ___   _ __  |___ /
| |_) || | | || __|| '_ \  / _ \ | '_ \   |_ \
|  __/ | |_| || |_ | | | || (_) || | | | ___) |
|_|     \__, | \__||_| |_| \___/ |_| |_||____/
        |___/

||===============Available Types================||
||# strings, bytes, tuples, lists, dicts, sets, ||
@xjasonlyu
xjasonlyu / fishier.zsh-theme
Last active March 2, 2020 12:49
Oh-My-Zsh-Themes
# FISHY: ZSH Theme emulating the Fish shell's default prompt.
_fishy_collapsed_wd() {
echo $(pwd | perl -pe '
BEGIN {
binmode STDIN, ":encoding(UTF-8)";
binmode STDOUT, ":encoding(UTF-8)";
}; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g
')
}
@xjasonlyu
xjasonlyu / cloudflare_dns.py
Last active March 15, 2020 08:42
DDNS Update Scripts for Cloudflare
#!/usr/bin/env python
import sys
import json
import requests
# Simple Cloudflare API
class Couldflare(object):
@xjasonlyu
xjasonlyu / add-ignore-file.py
Created July 17, 2020 05:41
Add .ignore file for emby/jellyfin
#!/usr/bin/env python3
import os
import sys
def touch(filename):
with open(filename, 'w') as f:
pass
@xjasonlyu
xjasonlyu / padt.py
Created December 21, 2020 09:18
PPPoE Client-off Attack
import sys
from scapy.all import *
# server_mac = 'e4:35:c8:81:04:89'
def fuck_it(iface: str, server_mac: str, client_mac: str, session_id: int):
print(
f'iface: {iface}, server_mac: {server_mac}, client_mac: {client_mac}, session_id: {session_id}')
p = Ether()/PPPoE()
@xjasonlyu
xjasonlyu / ocr.py
Last active July 23, 2021 09:16
VideoSubFinder OCR using Google Cloud
import os
import re
import sys
import logging
from io import StringIO
from concurrent import futures
from google.cloud import vision
IMAGE_EXT = ('.jpg', '.jpeg', '.png')
@xjasonlyu
xjasonlyu / vocabulary.md
Created August 30, 2021 06:10
TPO1-54 词汇题专项练习

TPO1-54 词汇题专项练习

1、The word incredible in the passage is closest in meaning to

  • a) Confusing
  • b) Comforting
  • c) Unbelievable
  • d) Interesting

2、The word out of sight in the passage is closest in meaning to