This file contains 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
rustup target add armv7-unknown-linux-musleabihf | |
brew install arm-linux-gnueabihf-binutils | |
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-ld cargo build --target=armv7-unknown-linux-musleabihf |
This file contains 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
brew install SergioBenitez/osxct/x86_64-unknown-linux-gnu | |
rustup target add x86_64-unknown-linux-gnu | |
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc cargo build --target=x86_64-unknown-linux-gnu |
This file contains 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
sudo qemu-system-aarch64 \ | |
-kernel /Volumes/data/qemu/openwrt-23.05.05-armsr/openwrt-23.05.2-armsr-armv8-generic-initramfs-kernel.bin \ | |
-drive file=/Volumes/data/qemu/openwrt-23.05.05-armsr/openwrt-23.05.2-armsr-armv8-generic-squashfs-rootfs.img.work,if=virtio,format=raw \ | |
-append root=/dev/vda \ | |
-cpu cortex-a57 -m 2048 -smp 2 -machine virt \ | |
-nographic \ | |
-device virtio-net-pci,netdev=net0 -netdev vmnet-host,id=net0,net-uuid=86d5e2de-594c-421e-be0d-8a3ac19dc207 \ | |
-device virtio-net-pci,netdev=net1 -netdev vmnet-bridged,ifname=en0,id=net1 | |
This file contains 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
ssh -o ProxyCommand="corkscrew ng-dpx01.intinfra.com 3128 <home ip> 443" -o 'RemoteForward=localhost:23 localhost:22' root@localhost | |
connect bak: | |
ssh \ | |
-o PermitLocalCommand=yes \ | |
-o LocalCommand="ifconfig tun5 192.168.244.2 pointopoint 192.168.244.1 netmask 255.255.255.0" \ | |
-o ServerAliveInterval=60 \ | |
-w 5:5 root@localhost -p 23 \ | |
'ifconfig tun5 192.168.244.1 pointopoint 192.168.244.2 netmask 255.255.255.0; echo tun0 ready' |
This file contains 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 <concepts> | |
#include <experimental/coroutine> | |
#include <iostream> | |
#include <unistd.h> | |
#include <thread> | |
#include <vector> | |
struct awaitable { |
This file contains 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
echo "http://dl-cdn.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories | |
apk add docker | |
service docker start | |
service docker enable | |
apk add curl | |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-amd64 | |
chmod +x ./kind | |
mv ./kind /usr/local/bin/kind |
This file contains 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
qemu-system-aarch64 -M virt -m 1G -cpu cortex-a57 -smp 1 -cdrom alpine-virt-3.15.4-aarch64.iso -pflash "/usr/local/Cellar/qemu/6.2.0_1/share/qemu/edk2-aarch64-code.fd" -serial stdio -nodefaults -M virt,highmem=off -boot d | |
qemu-system-aarch64 -nographic -machine virt -m 4096 -cpu cortex-a57 -drive if=pflash,format=raw,readonly,file=/usr/local/Cellar/qemu/6.2.0_1/share/qemu/edk2-aarch64-code.fd -drive format=raw,readonly,file=alpine-virt-3.15.4-aarch64.iso |
This file contains 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
curl --basic -X "POST" -u XXX@YYY -v https://autodiscover-s.outlook.com/autodiscover/autodiscover.xml -H "Content-Type: text/xml" -d @a.txt | |
<?xml version="1.0" encoding="utf-8"?> | |
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006"> | |
<Request> | |
<EMailAddress>XXXXXXXXX</EMailAddress> | |
<AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006</AcceptableResponseSchema> | |
</Request> | |
</Autodiscover> |
This file contains 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
qemu-system-arm -M virt-2.9 -kernel openwrt-18.06.5-armvirt-32-zImage -no-reboot -nographic \ | |
-device virtio-net-pci,mac=00:00:00:00:00:01,netdev=br0 -netdev bridge,br=br0,id=br0 \ | |
-device virtio-net-pci,mac=00:00:00:00:00:02,netdev=br1 -netdev bridge,br=br1,id=br1 \ | |
-m 128M \ | |
-drive file=openwrt-18.06.5-armvirt-32-root.ext4,if=virtio,format=raw \ | |
-append "root=/dev/vda" | |
network: | |
config interface 'loopback' |
This file contains 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" | |
"net" | |
"io" | |
"github.com/hashicorp/raft" | |
"time" | |
"os" | |
"flag" |
NewerOlder