Skip to content

Instantly share code, notes, and snippets.

View Dobby233Liu's full-sized avatar

Liu Wenyuan Dobby233Liu

View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 8, 2024 22:50
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@FlyTechVideos
FlyTechVideos / server.py
Last active January 3, 2024 14:02
Simple web server which logs accesses and data [https://www.youtube.com/watch?v=TB3OEG0bKwc]
#!/usr/bin/env python3
from flask import Flask, request, send_from_directory
from datetime import datetime
from user_agents import parse
app = Flask(__name__)
def censor_ip(ip):
@abc1763613206
abc1763613206 / bvtest.py
Last active February 23, 2024 22:18
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
import java.util.*;
public class Main {
static long[] memo = new long[91];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print(fibo(sc.nextInt()));
}
static long fibo(int n){
if (n<=1) return n;
@fischerbach
fischerbach / README.md
Created January 31, 2020 06:57 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
# I am ashamed for writing this.
import inspect;
class Cin:
""" time to whip out some python magic """
def __rshift__(self, other):
# I don't want to require that "other" is declared global.
cin = input();
@xjohjrdy
xjohjrdy / xiaoxiao_tts.py
Last active April 24, 2024 09:27
返回的音频没有文件头,所以我随便加的一个文件头,但显示的音频时长有问题。如果播放器不能正常播放,可以使用Chrome播放。
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from ws4py.client.threadedclient import WebSocketClient
import binascii
class WSClient(WebSocketClient):
def __init__(self, url, text, filename):
@brandedoutcast
brandedoutcast / spam-domains
Last active July 1, 2023 02:28
Spam domains that plague my email
jmails.info
sacustomerdelight.co.in
extrobuzzapp.com
ixigo.info
offer4uhub.com
netecart.com
101coupon.in
freedealcode.in
bankmarket.in
hotoffers.co.in
@Orangestar12
Orangestar12 / ffmpeg.md
Last active February 13, 2024 08:09
quick ffmpeg cheat sheet

If this is too much for you, check out ffmpeg.lav.io

These are a few quick easy ffmpeg command lines that can be used to make oft-used video formats. I use them a lot so I wrote them down in a txt file but I converted it to markdown to upload here and access on all my pcs.

Feel free to use 'em. I've gathered them through superuser posts, wiki trawls, and personal experience.


General notes