Skip to content

Instantly share code, notes, and snippets.

View haoqixu's full-sized avatar

xu0o0 haoqixu

View GitHub Profile
@haoqixu
haoqixu / agent loop
Created March 10, 2025 04:16 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@haoqixu
haoqixu / aproducer.py
Created October 1, 2020 09:01 — forked from dabeaz/aproducer.py
"Build Your Own Async" Workshop - PyCon India - October 14, 2019 - https://www.youtube.com/watch?v=Y4Gt3Xjd7G8
# aproducer.py
#
# Async Producer-consumer problem.
# Challenge: How to implement the same functionality, but no threads.
import time
from collections import deque
import heapq
class Scheduler:
@haoqixu
haoqixu / gitproxy-socat
Created January 24, 2020 07:47 — forked from sit/gitproxy-socat
A simple wrapper around socat to use as a git proxy command
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
@haoqixu
haoqixu / README.md
Created June 6, 2019 06:35 — forked from eruvanos/README.md
Simple mock server for testing using Flask

Mock server for testing using flask

Prepare

Install flask and requests to run this example.

@haoqixu
haoqixu / 分布式系统学习资料.md
Last active April 9, 2019 02:01 — forked from zjhiphop/分布式系统学习资料.md
分布式系统学习资料
#!/bin/bash
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me
PID=$(pgrep -u USER gnome-session-b)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH'
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected] set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)'
@haoqixu
haoqixu / .xinitrc.intel
Created February 8, 2016 14:14 — forked from hyrathb/.xinitrc.intel
gswitch
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done