Skip to content

Instantly share code, notes, and snippets.

View woodongwong's full-sized avatar
🎯
$ nano php

woodong woodongwong

🎯
$ nano php
  • Peking
  • 02:44 (UTC +08:00)
View GitHub Profile
@woodongwong
woodongwong / check_mysql_data_overflow.py
Last active April 19, 2023 04:55
Check for data overflow in MySQL string type fields.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pymysql
import argparse
import getpass
def parse_command_line_args():
parser = argparse.ArgumentParser()
@woodongwong
woodongwong / History-All.ps1
Created April 11, 2023 04:12
Get the history of all sessions in PowerShell
# PS > notepad $PROFILE
function Get-History-All
{
Get-Content -Path (Get-PSReadlineOption).HistorySavePath
}
New-Alias history-all Get-History-All
@woodongwong
woodongwong / chat-gpt-streaming-output.sh
Created April 9, 2023 07:19
Implement chatGPT streaming content output in the shell
#!/usr/bin/env sh
OPENAI_API_KEY="sk-xxx"
request_params=$(
cat <<EOF
{
"model": "gpt-3.5-turbo",
"stream": true,
"messages": [
@woodongwong
woodongwong / iptv.tvfix.org.m3u8.txt
Last active January 18, 2024 02:12
iptv.tvfix.org(电视侠)直播源,see: https://github.com/woodongwong/tvfix
see: https://github.com/woodongwong/tvfix