-
下载解压 busybox 并配置环境变量
wget https://busybox.net/downloads/busybox-1.36.1.tar.bz2 tar -xf busybox-1.36.1.tar.bz2 cd busybox-1.36.1 # 配置环境变量 export ARCH=arm64 export CROSS_COMPILE=aarch64-linux-gnu-
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# @author: jamlee | |
# date: 20250703 | |
# platform: mac pro m3 | |
# 设置工作目录(模拟原始流程中的$WORK/b001) | |
rm -fr tmp | |
mkdir tmp | |
WORK_DIR=$(pwd)/tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" CSCOPE settings for vim | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" | |
" This file contains some boilerplate settings for vim's cscope interface, | |
" plus some keyboard mappings that I've found useful. | |
" | |
" USAGE: | |
" -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a | |
" 'plugin' directory in some other directory that is in your |
These are the steps I used to get Ubuntu ARM aarch64 running with QEMU on OSX.
Get Ubuntu Image and QEMU EFI:
wget https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-arm64-uefi1.img
wget https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.fd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stap | |
// Linux 172-19-0-11 5.4.0-109-generic #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux | |
//tencent cloud centos 7.2 20220429 | |
// tcp_send_active_reset 检测 | |
probe kernel.statement("*@net/ipv4/tcp.c:2054") { | |
if (execname() == "node") { | |
printf("tcp_send_active_reset: %s\n", pp()) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/errno.h> | |
#include <linux/init.h> | |
#include <linux/netdevice.h> | |
#include <linux/etherdevice.h> | |
#include <linux/ethtool.h> | |
#include <linux/skbuff.h> | |
#include <linux/slab.h> | |
#include <linux/of.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage | |
# ./exsi.sh 192.168.31.31 192.168.50.31 | |
# apt install cloud-utils | |
hostname=$(echo $1 | sed s/\\./-/g) | |
{ echo instance-id: $hostname; echo local-hostname: $hostname; } > meta-data | |
cat > user-data <<EOF | |
#cloud-config | |
users: | |
- default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stackedCoroutine(\Generator $gen) | |
{ | |
$stack = new \SplStack; | |
$exception = null; | |
for (;;) { | |
try { | |
if ($exception) { | |
$gen->throw($exception); | |
$exception = null; | |
continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"golang.org/x/sys/unix" | |
"os" | |
"os/exec" | |
"syscall" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
prefix="/root/.theia-ide" | |
# go | |
snap install go --classic # 较新的版本 | |
go get -u -v github.com/ramya-rao-a/go-outline | |
go get -u -v github.com/acroca/go-symbols | |
go get -u -v github.com/nsf/gocode | |
go get -u -v github.com/rogpeppe/godef |
NewerOlder