How to connect to CloudFoundry’s Loggregator directly via WebSockets

Firstly make sure you can run the standard CloudFoundry cli: cf logs [APP_NAME] Then turn on tracing: export CF_TRACE=true You will see a HTTP request and then it will switch to a secure WebSocket: WEBSOCKET REQUEST: [2015-04-22T11:27:22+01:00] GET /tail/?app=[APP_GUID] HTTP/1.1 Host: wss://loggregator.[YOUR_CF_DOMAIN]:443 Upgrade: websocket Connection: Upgrade Sec-WebSocket-Version: 13 Sec-WebSocket-Key: [HIDDEN] Origin: http://localhost Authorization: [PRIVATE DATA […]

Intel Graphics Installer on Ubuntu 14.10

So if you just downloaded the latest Intel Graphics Installer and just found that it doesn’t support Ubuntu 14.10. Fear not you can trick it into installing by doing the following: First backup sudo cp /etc/lsb-release /etc/lsb-release.backup Then edit the file sudo nano /etc/lsb-release And put the following in there DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty This will allow […]

Updated power savings settings for Samsung Series 9 (NP900X3C-A05UK) and Ubuntu 14.10

Here is my updated /etc/rc.local for Ubuntu 14.10 #!/bin/sh -e # Sleep so all services have started before we change settings sleep 5 # Set Intel Audio to power save echo ‘1’ > ‘/sys/module/snd_hda_intel/parameters/power_save’; # Temp disable ethernet port modprobe -r r8169 # Wireless Power Saving for interface wlan0 iw dev wlan0 set power_save on […]

Bash function to switch Java versions

setjava() { if [ “$1” = “-q” ]; then local quiet=true shift fi local jdk=~/Applications/Java/jdk1.$1 if [ ! -d “${jdk}” ]; then echo Jdk not found: ${jdk} return 1 fi export JAVA_HOME=${jdk} export PATH=${JAVA_HOME}/bin:${PATH} if [ -z “${quiet}” ]; then java -version fi } export -f setjava I have symlinks for all major versions of […]