Skip to content

Instantly share code, notes, and snippets.

@eshizhan
eshizhan / conv2vmx-ovf.py
Last active April 25, 2021 22:05
a script that can help import VMs into VMware ESXi from VirtualBox. tested vbox 4.2.18 and ESXi 5.1.
#!/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 July 13, 2016 08:42
show your public ip and location
#!/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 March 9, 2013 04:03
sort all installed package by size
dpkg-query -Wf '${Installed-size}\t${Package}\n' | sort -n
@eshizhan
eshizhan / dpkg1.sh
Created February 15, 2013 17:29
filter file from a list, sort by size for installed file on dpkg
dpkg -L vim-runtime | xargs -i find {} -maxdepth 0 -type f | xargs ls -lSr