Skip to content

Instantly share code, notes, and snippets.

View jumping's full-sized avatar
🎯
Focusing

Jumping Qu jumping

🎯
Focusing
  • Shanghai, China
View GitHub Profile
@jumping
jumping / run-setup.sh
Last active September 12, 2025 08:48
Configure the runtime environment for the setup_step.sh script
#!/usr/bin/env bash
set -Eeuo pipefail
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S%z')] $*"
}
usage() {
cat <<'EOF'
Usage: run-setup.sh --secret-id <secret_id> [--setup-script </path/to/setup_step.sh>]
@jumping
jumping / setup_step.sh
Created September 12, 2025 06:41
Setup for AWS EKS(ALB、Ingress Nginx、 EFS)
#!/usr/bin/env bash
set -euo pipefail
# ==========================================
# Setup for EKS + EFS
# - Requires: kubectl, awscli, helm
# - Preconditions: EKS cluster is ready (nodes Ready), EFS exists and is 'available'
# ==========================================
EFS_ID=""
@jumping
jumping / nvmCommands.js
Created January 6, 2025 09:50 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@jumping
jumping / llama2-mac-gpu.sh
Created September 12, 2023 14:32 — forked from adrienbrault/llama2-mac-gpu.sh
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@jumping
jumping / sender.go
Created January 31, 2023 07:30 — forked from douglasmakey/sender.go
Golang - send an email with attachments.
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"mime/multipart"
"net/smtp"
"os"
@jumping
jumping / gh-check
Created May 29, 2022 23:42 — forked from lilydjwg/gh-check
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):
@jumping
jumping / nginx_proxy_s3
Last active October 30, 2019 05:10
nginx proxy request of object on s3
server{
listen 80;
server_name test-mccdn.xxx.com;
location / {
#resolver 8.8.8.8;
#rewrite ^([^.]*[^/])$ $1/ permanent;
proxy_http_version 1.1;
proxy_set_header Connection "";
import os
import sys
from functools import wraps
import gevent
import six
sys.stderr = open(os.devnull, 'w')
@jumping
jumping / main.go
Created February 22, 2019 11:25
Not using context
package main
import (
"fmt"
"net/http"
"os"
"github.com/apex/log"
"github.com/gorilla/mux"
)
@jumping
jumping / dummy-web-server.py
Last active January 29, 2019 03:20 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost