Skip to content

Instantly share code, notes, and snippets.

@eshizhan
eshizhan / conv2vmx-ovf.py
Last active Mar 25, 2020
a script that can help import VMs into VMware ESXi from VirtualBox. tested vbox 4.2.18 and ESXi 5.1.
View conv2vmx-ovf.py
#!/usr/bin/env python
#
# usage:
# conv2vmx-ovf.py some-vm.ovf
#
# ref: http://www.cnblogs.com/eshizhan/p/3332020.html
#
import sys
fn = sys.argv[1]
@eshizhan
eshizhan / getpubip.sh
Last active Jul 13, 2016
show your public ip and location
View getpubip.sh
#!/bin/bash
# get your public ip
curl ip.3322.net
curl api.ipify.org
curl www.trackip.net/ip
curl canihazip.com/s
curl icanhazip.com
curl ns1.dnspod.net:6666
curl ifconfig.me
curl members.3322.org/dyndns/getip
@eshizhan
eshizhan / dpkg2.sh
Created Mar 9, 2013
sort all installed package by size
View dpkg2.sh
dpkg-query -Wf '${Installed-size}\t${Package}\n' | sort -n
@eshizhan
eshizhan / dpkg1.sh
Created Feb 15, 2013
filter file from a list, sort by size for installed file on dpkg
View dpkg1.sh
dpkg -L vim-runtime | xargs -i find {} -maxdepth 0 -type f | xargs ls -lSr