Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Hedley cghsystems

View GitHub Profile
@cghsystems
cghsystems / tcpdump
Created Jan 17, 2014
In order to listen to network packet on a given network and port
View tcpdump
#!/bin/bash
sudo tcpdump -A -i eth1 port 4222 -s0
#-w dumps the output out to a file
@cghsystems
cghsystems / copy_blobs.rb
Created Jan 8, 2014
This script will replace all soft linked Bosh blobs contained in $BOSH_RELEASE_DIR/blobs with hard links. This helps solve the issue of moving blobs from a created release to a new blobstore. After this script has run `bosh blobs` should show a set of blobs ready to be uploaded to a blobstore. Note: config/blobs will probably need removed.
View copy_blobs.rb
require 'fileutils'
require 'find'
def cp_symlink(f)
new_file = "#{f}.new"
old_file = File.readlink(f)
FileUtils.cp(old_file, new_file)
`rm -r #{f}`
File.rename(new_file, f)
puts "Processed #{f}"
You can’t perform that action at this time.