Skip to content

Instantly share code, notes, and snippets.

View lqshow's full-sized avatar
🌴
I may be slow to respond.

LQ lqshow

🌴
I may be slow to respond.
View GitHub Profile
@lqshow
lqshow / agent loop
Created March 11, 2025 06:22 — 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
@lqshow
lqshow / 0-go-os-arch.md
Created April 8, 2023 13:22 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@lqshow
lqshow / README.md
Last active October 31, 2020 01:48
Kubernetes command line tools

工具列表

  1. kubectx:用于切换kubernetes context
  2. kubens:用于切换kubernetes namespace
  3. kube-ps1:为命令行终端增加$PROMPT字段
  4. kube-shell:交互式带命令提示的kubectl终端

终端下kubectl命令自动补全

# 修改~/.zshrc文件
@lqshow
lqshow / Makefile
Last active December 24, 2018 15:16
Creating a kubeconfig file for Kubernetes cluster
SHELL := /bin/bash
ifneq ($(NAMESPACE),)
NAMESPACE ?= $(NAMESPACE)
else
NAMESPACE ?= default
endif
SERVICE_ACCOUNT := $(SERVICE_ACCOUNT)
KUBE_APISERVER := $(KUBE_APISERVER)
@lqshow
lqshow / hijack.txt
Created August 7, 2018 13:53 — forked from cpuspellcaster/hijack.txt
Docker Hijack Protocol
Stream details:
When using the TTY setting is enabled in POST, the stream is the raw data from the process PTY and client’s stdin. When the TTY is disabled, then the stream is multiplexed to separate stdout and stderr.
The format is a Header and a Payload (frame).
HEADER
The header contains the information which the stream writes (stdout or stderr). It also contains the size of the associated frame encoded in the last four bytes (uint32).
UPDATE dataset_authorize 
    SET status = CASE 
    WHEN dataset_id=X'382460757A5945898A7298B39A0812CB' AND authorized_object_id=X'D5BD2BA2552F4AD488648CDCA962D9D1' THEN 'REJECTED'
    WHEN dataset_id=X'92DC4F522B3941808DB4C3796191CDC3' AND authorized_object_id=X'D5BD2BA2552F4AD488648CDCA962D9D1' THEN 'AGREED'
    ELSE status END
;
@lqshow
lqshow / spark_sql_pagination.md
Last active December 2, 2017 08:21
spark sql pagination

use limit

select gender, smoking row_number() over (ORDER BY 1) as rowno from window_func_test limit 10;
+---------+----------+--------+--+
| gender  | smoking  | rowno  |
+---------+----------+--------+--+
@lqshow
lqshow / FileExample.java
Last active November 12, 2017 05:53
Java NIO
package com.example.base.nio;
import java.io.IOException;
import java.nio.file.*;
public class FileExample {
public static void main(String[] args) {
String fileName = "/Users/linqiong/Downloads/profile";
Path path = Paths.get(fileName);
boolean pathExists = Files.exists(path, new LinkOption[]{LinkOption.NOFOLLOW_LINKS});