Skip to content

Instantly share code, notes, and snippets.

View zhxq's full-sized avatar

Xiangqun Zhang zhxq

  • Syracuse University
  • Syracuse/Anshan
  • 11:48 (UTC -04:00)
View GitHub Profile
@zhxq
zhxq / gist:d34df0ce34ed34b6d796
Created October 21, 2014 15:45
Mac OS X 10.10 Install.DMG Flashdisk Dumper
#!/bin/bash
if [[ $1 == "" ]]; then
echo "欢迎您使用由zhxq开发的Mac OS X 10.10制作安装盘工具!"
echo "本软件以CC-BY-SA 3.0协议发布。"
echo "本软件涉及到磁盘操作,若不当使用可能会造成数据丢失!"
echo "本人对一切数据丢失概不负责。"
echo "操作有价,数据无价!"
echo "ver:1.1 beta"
echo "www.zhxqweb.com"
echo "zhxq@zhxqweb.com"
@zhxq
zhxq / wsl2-network.ps1
Created June 6, 2021 09:08 — forked from daehahn/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@zhxq
zhxq / resize_disk_image.md
Created July 31, 2023 00:14 — forked from joseluisq/resize_disk_image.md
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2