Skip to content

Instantly share code, notes, and snippets.

View lidaobing's full-sized avatar
Mammal - verified by Github

LI Daobing lidaobing

Mammal - verified by Github
View GitHub Profile
lidaobing / main.go
Created April 1, 2023 09:30
chatgpt proxy with gitlab auth method
package main
import (
// 部署流程请参考:
// @see
const aircode = require('aircode');
const lark = require('@larksuiteoapi/node-sdk');
const EventDB = aircode.db.table('event');
const { Configuration, OpenAIApi } = require("openai");
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
const openai = new OpenAIApi(configuration);
if [ `uname` = 'Darwin' ]; then
if [ `arch` = 'arm64' ]; then
export PATH="/opt/homebrew/sbin:/opt/homebrew/bin:/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:/usr/local/bin:/opt/homebrew/bin:$PATH"
export PS1="$PS1_ARCH$PS1"
alias ibrew="arch -x86_64 /usr/local/bin/brew"
#include <iostream>
#include <sigc++/signal.h>
using namespace std;
class A {
sigc::signal<void()> s1;
// Result:
// signal does not depends on main loop
// GSimpleAction is a very useful tool for DocView model
#include <gio/gio.h>
namespace {
bool c1 = false;
bool c2 = false;
void callback1() {
diff --git a/wrapper/ibus/setup/ b/wrapper/ibus/setup/
index e20a3a5..396c514 100644
--- a/wrapper/ibus/setup/
+++ b/wrapper/ibus/setup/
@@ -39,10 +39,12 @@ import os
from os import path
import gtk
+ import glib
except ImportError:
#!/usr/bin/env /usr/local/bin/python3
import netrc
import requests
import json
class Task:
def __init__(self, number, title, url, assignee):
self.number = number
self.title = title
    participant Alice
    participant Bob
    Alice->John: Hello John, how are you?
    loop Healthcheck
        John->John: Fight against hypochondria
    Note right of John: Rational thoughts <br/>prevail...
 John--&gt;Alice: Great!
import json, os, sys, uuid, datetime, subprocess, traceback
def runCmd(cmd):
return [str(x) for x in subprocess.check_output(cmd, shell=True).splitlines()]
def getServerId():
import http.server
import socketserver
import datetime
import uuid
from urllib.parse import urlparse, parse_qs
__all__ = ['run']