Skip to content

Instantly share code, notes, and snippets.

View zhxq's full-sized avatar

Xiangqun Zhang zhxq

  • Syracuse University
  • Syracuse/Anshan
  • 20:53 (UTC -04:00)
View GitHub Profile
@joseluisq
joseluisq / resize_disk_image.md
Last active April 16, 2024 11:18
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

@daehahn
daehahn / wsl2-network.ps1
Last active March 21, 2024 22:37
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;
}
@ePirat
ePirat / INSTALL.md
Last active April 7, 2023 13:43
Cross-compile libaacs for Windows (64bit)

Cross-compile libaacs for Windows (64bit)

For this guide the ubuntu:yakkety Docker image was used.

Install the cross-compile toolchain

apt-get install mingw-w64-tools gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wget gettext bison flex
@loderunner
loderunner / osx-ld.md
Last active March 21, 2024 07:52
potential blog posts

ld – Wading through Mac OS X linker hell

Intro

Friend: I tried looking at static linking in Mac OS X and it seems nearly impossible. Take a look at this http://stackoverflow.com/a/3801032

Me: I have no idea what that -static flag does, but I'm pretty sure that's not how you link to a library. Let me RTFM a bit.

Minutes later...

@wofeiwo
wofeiwo / flup_fcgi_client.py
Created September 14, 2012 06:33
Python FCGI Client
#!/usr/bin/env python
# pylint: disable=W0622
# Copyright (c) 2006 Allan Saddi <allan@saddi.com>
# Copyright (c) 2011 Vladimir Rusinov <vladimir@greenmice.info>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met: