Thursday, September 27, 2012

Offline reference for javascript, jquery, jquery-ui and d3.js

For anyone who'se looking to do some javascript/jquery/d3 hacking on a plane without internet, here's the API references I've been able to dig up.

HTML/CSS/SVG

The official spec at www.w3.org is fine as a reference and the non-draft standards have a PDF option to download the spec. See generally http://www.w3.org/standards/webdesign/, and for HTML/CSS/SVG specifically the most recent ones as of this post seem to be:

Javascript

The best doc I could find is in CHM (windows help file format). You can read this file with xchm (e.g., sudo aptitude install xchm). The file itself is at: http://starcraft73.tripod.com/javascript/javascript.zip

Jquery and Jquery-UI

There's a single CHM file that includes docs for both jquery and jquery-ui at https://github.com/Yahasana/jqdoc-parser/blob/master/jQuery-UI-Reference-1.8.chm?raw=true There's a PDF version of just JQuery at https://bitbucket.org/greydwarf/jquerydoc/downloads/jquery_ref.pdf

D3.js

Getting D3 docs available offline requires a bit more work. Following roughly this guide, here are the steps:
  1. sudo aptitude install libxml2-dev libxslt-dev ruby1.8
  2. gem install gollum
  3. git clone https://github.com/mbostock/d3.wiki.git d3.wiki
  4. cd d3.wiki ; gollum
  5. Navigate your browser to http://localhost:4567/ or whatever port gollum starts up on (it prints it out when it starts up).

Monday, September 24, 2012

Repairing crashing Juniper VPN client on Ubuntu 12.04

In case anyone else is running into issues with their juniper VPN client on Ubuntu, here are two tricks that work for me. First, if it looks like the applet is crashing as it is establishing a connection, it could be because your /etc/resolv.conf is broken or missing. Try following: which details running sudo dpkg-reconfigure resolvconf to restore resolve.conf. There's probably a bug in juniper VPN client that makes it crash if resolv.conf is not to its liking. Another blunt thing I've sometimes had success with is good old rm -rf ~/.juniper_networks, which removes the applets and juniper config information and forces it to redownload it. Hope this helps!