Skip to content

Instantly share code, notes, and snippets.

@tkak
tkak / main.go
Created March 31, 2015 02:01
Sample code to run finder.ResourcePool() function in govmomi
package main
import (
"log"
"net/url"
"os"
"github.com/vmware/govmomi"
"github.com/vmware/govmomi/find"
"github.com/vmware/govmomi/object"
@@ -358,6 +358,11 @@
cd "$source_path"
{
+ if [ -n $APXS ]; then
+ _LIBEXECDIR=`$APXS -q LIBEXECDIR`
+ sed -i -e "s|LIBEXECDIR='\$(INSTALL_ROOT)$_LIBEXECDIR'|LIBEXECDIR=$PREFIX/libexec|" $TMP/source/$DEFINITION/Makefile
+ fi
+
make
curl -sL 'https://github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz' | tar zx
cd libevent-2.0.20-stable
./configure --prefix=$HOME/local --disable-shared
make && make install
cd
curl -sL 'http://downloads.sourceforge.net/tmux/tmux-1.8.tar.gz' | tar zx
cd tmux-1.8
./configure --prefix=$HOME/local CFLAGS="-I$HOME/local/include -R$HOME/local/lib" LDFLAGS="-L$HOME/local/lib"
make && make install
tmux -V
@tkak
tkak / file0.txt
Created May 25, 2012 23:05
To set env value to registered DNS IP address ref: http://qiita.com/items/b01198b48ecac47c02c6
ip=`host \`hostname\` | cut -d" " -f4`
echo ${ip}