Skip to content

Instantly share code, notes, and snippets.

@Akshay-Hegde
Akshay-Hegde / conv2vmx-ovf.py
Created November 19, 2019 14:49 — forked from eshizhan/conv2vmx-ovf.py
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]
@Akshay-Hegde
Akshay-Hegde / .htaccess
Created July 12, 2021 12:46 — forked from simenbrekken/.htaccess
Apache mod_rewrite cookie based localization
RewriteEngine On
# Set locale cookie if lang query string is set (90 days expiry time)
RewriteCond %{QUERY_STRING} lang=(.*)
RewriteRule .* ?locale=%1 [cookie=locale:%1:.%{HTTP_HOST}:129600:/]
# Append locale to query string if:
# - Query string hasn't already been rewritten
# - Locale cookie is set
# - Request URI isn't a valid file (for assets etc.)