Skip to content

Instantly share code, notes, and snippets.

nginx conf that capture body for specific location:
```
http {
log_format l2met 'measure#nginx.service=$request_time request_id=$http_x_request_id';
log_format capturebody "request_body = $request_body";
access_log logs/nginx/access.log l2met;
error_log logs/nginx/error.log;

Getting this error during vagrant up --provider=vmware_fusion:

[default] Waiting for HGFS kernel module to load...
The HGFS kernel module was not found on the running virtual machine.
This must be installed for shared folders to work properly. Please
install the VMware tools within the guest and try again. Note that
the VMware tools installation will succeed even if HGFS fails
to properly install. Carefully read the output of the VMware tools
installation to verify the HGFS kernel modules were installed properly.
> /Applications/VMware\ Fusion.app/Contents/Library/vmrun -T fusion clone /Users/jefflab/code/tule/server/ubuntu_12.04.3.vmwarevm/ubuntu_12.04.3.vmx output-vmware-vmx/packer-vmware-vmx-1388784882.vmx full
Error: One of the parameters was invalid

Problem

When I run PACKER_LOG=debug packer build server.json I get the error:

2014/01/03 12:51:30 ui: ==> vmware-vmx: Cloning source VM...
2014/01/03 12:51:30 /usr/local/packer/packer-builder-vmware-vmx: 2014/01/03 12:51:30 Cloning from: ubuntu_12.04.3.vmwarevm/ubuntu_12.04.3.vmx
2014/01/03 12:51:30 /usr/local/packer/packer-builder-vmware-vmx: 2014/01/03 12:51:30 Cloning to: output-vmware-vmx/packer-vmware-vmx-1388782290.vmx
2014/01/03 12:51:30 /usr/local/packer/packer-builder-vmware-vmx: 2014/01/03 12:51:30 Executing: /Applications/VMware Fusion.app/Contents/Library/vmrun [-T fusion clone ubuntu_12.04.3.vmwarevm/ubuntu_12.04.3.vmx output-vmware-vmx/packer-vmware-vmx-1388782290.vmx full]
2014/01/03 12:51:30 /usr/local/packer/packer-builder-vmware-vmx: 2014/01/03 12:51:30 stdout: Error: One of the parameters was invalid

Life-changing Room for Rent

Man, doesn't the San Francisco real estate market suck? Everything is tiny and expensive, and if you're new to the city, I bet you're feeling really overwhelmed.

But good news! Available for one lucky person is the opportunity to rent a room in a huge (by SF standards) house in Noe Valley with two of the most awesome housemates you could ask for.

@jefflab
jefflab / bh_startup_school.md
Created October 25, 2012 21:21
Ben Horowitz

Ben Horowitz

Quotes

Warren Buffet quote: "Best thing about being rich is that you don't have to do business with people you don't like"

Michael Jackson quote: "No matter how hard it looks, it's actually harder"

What Matters

@jefflab
jefflab / gist:3292220
Created August 8, 2012 05:00
Helper method to pull from database
module DisplayHelper
def pull_from_Datum(value)
points_array = []
Datum.find_each do |point|
time_point = point.created_at
value_point = point.value
# usage:
#
# ruby main.rb
# Usage:
#
# ruby main.rb
@jefflab
jefflab / gist:1482307
Created December 15, 2011 18:52
task to wait for NFS propagation
task :wait_for_current_symlink, :roles => :app do
run %Q[READY=0 ; until [ $READY -eq 1 ] ; do TARGET=`ls -l #{current_path} | sed 's/.*->\ //g'` ; RELEASE_PATH='#{release_path}' ; if [ $TARGET == $RELEASE_PATH ] ; then READY=1 ; fi; echo "waiting for NFS TARGET=$TARGET RELEASE_PATH=$RELEASE_PATH" ; sleep 2 ; done]
end
after "deploy:symlink", "wait_for_current_symlink"