Skip to content

Instantly share code, notes, and snippets.

var httpProxy = require('http-proxy');
httpProxy.createServer(function (req, res, proxy) {
req.headers['pragma'] = 'akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no';
proxy.proxyRequest(req, res, {
host: req.headers['host'],
port: 80
})
}).listen(9001);
#!/bin/bash
LASTSECTOR=`fdisk -l | grep /dev/vda1 | awk '{ print $4 }'`
/bin/echo "d
2
n
p
2
$LASTSECTOR
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 23, 2024 04:22
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@jtopper
jtopper / gist:8588263
Last active June 14, 2024 13:06
Add a new disk to a VMWare vagrant box
config.vm.provider :vmware_fusion do |vm|
vdiskmanager = '/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager'
dir = "#{ENV['HOME']}/vagrant-additional-disk"
unless File.directory?( dir )
Dir.mkdir dir
end

The Test

This test times how long it takes to run puppet apply to install a large amount of monitoring software on a Docker container using the Vagrant 1.6 Docker provisioner. It is a mixed test that measures network speed (downloading large packages and plugins,) disk performance, and CPU performance.

Linode

  • 2 GB Instance
  • Fedora 20
  • Fremont datacenter