Crowd logged in users

This came in useful for me today to understand users that could be disabled from a crowd instance: SELECT cwd_user.user_name AS Username, cwd_user.email_address AS "Email Address", from_unixtime(cwd_user_attribute.attribute_value/1000) AS "Last Logged In" FROM cwd_user LEFT OUTER JOIN cwd_user_attribute ON cwd_user_attribute.user_id = cwd_user.id AND cwd_user_attribute.attribute_name = 'lastAuthenticated' WHERE active = 'T' ORDER BY 3,2,1 ;

apple remote desktop and vnc

Ahh, so Apple’s Remote Desktop is just a simpler implementation of the VNC protocol (I’m sure there’s some propriety extensions in there but it’s nice to know you can use vncclient to connect to a Mac. Options that work well for VNC:- [Connection] Host=$HOSTNAME [Options] UseLocalCursor=1 UseDesktopResize=1 FullScreen=0 FullColour=1 LowColourLevel=1 PreferredEncoding=hextile AutoSelect=0 Shared=0 SendPtrEvents=1 SendKeyEvents=1 SendCutText=1 AcceptCutText=1 DisableWinKeys=1 Emulate3=0 PointerEventInterval=0 Monitor= MenuKey=F8 AutoReconnect=1 Not the fastest thing in the planet, but only enabling the Hextile option seems to work ok.

google authenticator on NetGear ReadyNAS

First I had to ensure that the stock debian packages are available for installation: $ tail /etc/apt/sources.list deb http://archive.debian.org/debian etch main Install g++ and other dependencies $ apt-get install g++ libpam0g-dev Download google-authenticator source code: $ git clone https://code.google.com/p/google-authenticator/ $ cd google-authenticator/ $ ./configure && make && make install Then simply follow the instructions over at here

home brew fusion/hybrid drives on OS X

There’s plenty of examples of doing this already but it’s as simple as: $ diskUtil coreStorage create ssdDisk hddDisk $ diskUtil coreStorage createVolume VolumeUUID jhfs+ "fusion Drive" 100% Seems to be working so far, although with typical Apple there’s no documentation on how files/objects are moved between the SSD and HDD components

HTTP Proxy with source IP on Tomcat

Run into a situation recently where proxying applications with nginx has masked the source IP - which normally is just annoying, but with Atlassian’s Crowd it’s more of a problem, this can be solved in later versions (Tomcat 6.0.32+) as follows: <Valve className="org.apache.catalina.valves.RemoteIpValve" internalProxies="proxy_IP_address" remoteIpHeader="x-forwarded-for" remoteIpProxiesHeader="x-forwarded-by" protocolHeader="x-forwarded-proto" /> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access." suffix=".log" pattern="combined" resolveHosts="false" /> The following should be used within nginx to forward that data into tomcat.