Skip to content

Instantly share code, notes, and snippets.

View zouguangxian's full-sized avatar

Zou Guangxian zouguangxian

View GitHub Profile
@zouguangxian
zouguangxian / jolt-core-failures.md
Last active July 8, 2025 00:17
jolt-core failures on aarch64
root ➜ /workspaces/jolt (feat/twist-shout-integration) $ uname -a
Linux b412b9efa4e4 6.10.14-linuxkit #1 SMP Sat May 17 08:28:57 UTC 2025 aarch64 GNU/Linux

Based on the code 4 days ago with rust nightly

root ➜ /workspaces/jolt (feat/twist-shout-integration) $ git rev-parse HEAD

c68c3831718d1ffa6f8d011336b77190e9ba9b59
root ➜ /workspaces/jolt (feat/twist-shout-integration) $ cargo nextest run --release -p jolt-core
@zouguangxian
zouguangxian / setup-zsh-in-container.sh
Last active June 30, 2025 10:54
Setup ZSH in a container
#!/bin/bash
[ -f /etc/dpkg/dpkg.cfg.d/excludes ] && sed -i'' "s:^path-exclude=.*:#path-exclude=.*:" /etc/dpkg/dpkg.cfg.d/excludes
apt-get update
apt-get install -y --no-install-recommends git fzf
[ -f /etc/dpkg/dpkg.cfg.d/excludes ] && sed -i'' "s:^#path-exclude=.*:path-exclude=.*:" /etc/dpkg/dpkg.cfg.d/excludes
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/custom/themes/powerlevel10k
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
@zouguangxian
zouguangxian / setup-zsh-in-debian.sh
Last active June 30, 2025 10:54
setup zsh with powerlevel10k in debian/ubuntu environment
#!/bin/sh
[ -f /etc/dpkg/dpkg.cfg.d/excludes ] && sed -i'' "s:^path-exclude=.*:#path-exclude=.*:" /etc/dpkg/dpkg.cfg.d/excludes
apt-get update && apt-get install -y --no-install-recommends zsh git fzf && rm -rf /var/lib/apt/lists/*
[ -f /etc/dpkg/dpkg.cfg.d/excludes ] && sed -i'' "s:^#path-exclude=.*:path-exclude=.*:" /etc/dpkg/dpkg.cfg.d/excludes
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
#!/bin/sh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -e 's/^plugins.*)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-completions)/' -e 's,^ZSH_THEME=.*,ZSH_THEME="powerlevel10k/powerlevel10k",' -i '' ~/.zshrc
@zouguangxian
zouguangxian / gist:2e524851fde5bddcb965
Created April 4, 2015 02:47
Firefox Responsive Design View Presents
[
{"key":"1920 x 1080","name":"Nexus 5 Landscape","width":1920,"height":1080},
{"key":"1080 x 1920","name":"Nexus 5 Portrait","width":1080,"height":1920},
{"key":"1024 x 768","name":"iPad Landscape","width":1024,"height":768},
{"key":"768 x 1024","name":"iPad Portrait","width":768,"height":1024},
{"key":"768 x 1024","name":"iPad 1 & 2","width":768,"height":1024},
{"key":"1536 x 2048","name":"iPad 3 & 4","width":1536,"height":2048},
{"key":"736 x 414","name":"iPhone 6 Plus Landscape","width":736,"height":414},
{"key":"414 x 736","name":"iPhone 6 Plus Portrait","width":414,"height":736},
{"key":"667 x 375","name":"iPhone 6 Landscape","width":667,"height":375},
@zouguangxian
zouguangxian / bandstats.pl
Created July 6, 2012 06:29
analyze access.log to get bandwidth statistics, perl version
#!/usr/bin/env perl
use Date::Parse;
use Date::Format;
use List::Util qw[min max];
$\="\n";
my %slot=();
my $STEP = 60;
while ($line=<>) {
@zouguangxian
zouguangxian / bandstats.py
Created July 6, 2012 06:28
analyze access.log to get bandwidth statistics
#!/usr/bin/env python
import sys
import re
import datetime
import time
STEP = 60
result = {}
while True:
@zouguangxian
zouguangxian / 12306.user.js
Created January 8, 2012 08:47 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011-2012 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js