Skip to content

Instantly share code, notes, and snippets.

View limboinf's full-sized avatar
🎯
Focusing

limbo limboinf

🎯
Focusing
View GitHub Profile
@limboinf
limboinf / tts.popclipextz
Created August 6, 2024 03:39
edge-tts playback popclip extention.
#popclip
name: tts
icon: iconify:ri:speak-line
interpreter: /bin/sh
shell script: |
/path/to/edge-playback --rate="${POPCLIP_OPTION_RATE:-+20%}" --voice "${POPCLIP_OPTION_VOICE:-zh-CN-XiaoxiaoNeural}" --text "$POPCLIP_TEXT"
options:
- identifier: rate
label: Rate (default +20%)
type: string
@limboinf
limboinf / settings.json
Created August 5, 2024 09:15
My zed settings configuration.
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
// 推荐:https://github.com/jellydn/zed-101-setup
{
"language_models": {
"anthropic": {
"api_url": "https://claude.xxx.workers.dev"
// #popclip extension for ChatGPT
// name: LimboGPT
// icon: iconify:logos:openai-icon
// language: javascript
// module: true
// entitlements: [network]
// options: [{
// identifier: apikey, label: API Key, type: string,
// description: 'Obtain API key from https://platform.openai.com/account/api-keys'
// }]
@limboinf
limboinf / youtube_download.py
Created June 7, 2023 16:22
yt-dlp 快速下载YouTube视频
import os
import subprocess
import multiprocessing
from colorama import Fore, Back, Style
def download_url(url):
flag = f'PID: {os.getpid()} --> 下载: {url}'
// group by traceId, event fields and get the max item.
void testIt() {
List<Event> events = new ArrayList<>();
events.add(new Event("AAA", "ROOM_START", 1000L, 10));
events.add(new Event("AAA", "ROOM_START", 1000L, 10));
events.add(new Event("BBB", "ROOM_START", 1002L, 15));
events.add(new Event("BBB", "ROOM_START", 1001L, 10));
// method1
Map<String, Map<String, List<Event>>> collect = events.stream()
@limboinf
limboinf / readme.md
Last active December 6, 2018 09:44
[linux tips]

在linux中,- 如果单独使用 - 符号,不加任何该加的文件名称时,代表"标准输入"的意思

如下小技巧,nc命令来传输目录下多个文件

# host A, on receiver, go to destination directory and execute:
$ nc -l $port | tar xf -

# host B,on sender
@limboinf
limboinf / ddata.go
Created December 18, 2017 07:22
Implement Read like Reader interface, you can get inspiration from buffer.go
package main
import (
"io"
"fmt"
)
type Data struct {
stream string
@limboinf
limboinf / gtopic.go
Created December 17, 2017 10:14
Get the latest topics of studygolang.com
package main
import (
"log"
"time"
"github.com/PuerkitoBio/goquery"
"github.com/briandowns/spinner"
)
@limboinf
limboinf / signal.go
Created October 16, 2017 09:08
[go signal] #go
package main
import (
"fmt"
"time"
"os"
"os/signal"
"syscall"
)
@limboinf
limboinf / access.lua
Created September 30, 2017 03:31 — forked from mariocesar/access.lua
Nginx Lua script redis based for Basic user authentication
function password_encode(password)
local bcrypt = require 'bcrypt'
return bcrypt.digest(password, 12)
end
function check_password(password, encoded_password)
local bcrypt = require 'bcrypt'
return bcrypt.verify(password, encoded_password)
end