Skip to content

Instantly share code, notes, and snippets.

View gantzm's full-sized avatar

Michael L. Gantz gantzm

View GitHub Profile
@gantzm
gantzm / gist:1507360
Created December 21, 2011 19:39
Maven: Check for updates to dependencies.
mvn versions:display-dependency-updates
@gantzm
gantzm / gist:1781819
Created February 9, 2012 18:27
Lock windows 7 screen from a shortcut.
rundll32.exe user32.dll,LockWorkStation
@gantzm
gantzm / gist:1941251
Created February 29, 2012 14:38
Bash history hacks.
# Taken from http://blog.sanctum.geek.nz/better-bash-history/
# Use append mode.
shopt -s histappend
# Keep last 5000 commands
HISTSIZE=5000
HISTTIMEFORMAT='%F %T '
@gantzm
gantzm / gist:2030516
Created March 13, 2012 18:30
How to find dns glue records.
dig +short com. NS
<answers>
dig +norec @h.gtld-servers.net. gantzgulch.com. NS
@gantzm
gantzm / pom.xml
Created March 30, 2012 01:58
Maven pom ordering of elements.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion/>
<parent>
<artifactId/>
<groupId/>
<version/>
<relativePath/>
@gantzm
gantzm / gist:2393900
Created April 15, 2012 17:09
Apply patches to ESXI.
esxcli --server=10.69.0.2 --username=root software vib update --depot=/vmfs/volumes/DataStore-1/ISO/update-from-esxi5.0-5.0_update01.zip
@gantzm
gantzm / linux_scsi_scan
Last active October 3, 2015 04:48
Linux - rescan scsi bus
echo "- - -" > /sys/class/scsi_host/host#/scan
@gantzm
gantzm / esxi_jumbo_frames.txt
Created December 4, 2012 21:59
Test jumbo frames on ESXI.
vmkping -s 8972 -d IP
@gantzm
gantzm / tar_par_compression
Created September 6, 2013 19:04
Parallel compression with tar.
alias tar='tar --use-compress-program=pbzip2'
create database db_name;
show databases;
create user db_user;
grant all on db_name.* to 'db_user'@'localhost' identified by 'db_password';