background preloader

Tech

Facebook Twitter

jQuery: The Write Less, Do More, JavaScript Library. Column Navigation Demonstration. Repository - Redmine. My os x nginx configuration » kusno.mudiarto. NYC Resistor » Electronics, Hacking, Classes, and Workspace. Rails on the Run - Sexy charts in less than 5 minutes. NOV 04 Update: demo app now available there . Sexy charts BDD style presentation at the SDRuby group to be posted soon on video podcast Last time , in our series, we saw how to add quickly and simply add Ajax pagination .

This time we’ll see how to add some sexy/fancy charts to your rails app. The goal is to end up with something like: Various options You might have heard or even tried solution such as Gruff or JFreeChart . While these solutions are great, they are certainly a pain in the butt. Def CreateChart pipe = IO .popen " java -cp C: \\ InstantRails \\ rails_apps \\ project \\ jfree \\ src;C: \\ InstantRails \\ rails_apps \\ project \\ jfree \\ lib \\ jcommon-1.0.0-rc1.jar;C: \\ InstantRails \\ rails_apps \\ project \\ jfree \\ lib \\ jfreechart-1.0.0-rc1.jar; CreateChart " pipe.close redirect_to " /graph/report " end Anyway, none of these solutions would let us create our charts in less than 5 minutes so let’s cut the story short.

AmCharts [DISCLAIMER: amCharts is and . Setup Usage. Rdf. jQuery iPod-style Drilldown Menu | Filament Group, Inc. Posted by Maggie on 04/02/2009 Topics: css jQuery jQuery UI ThemeRoller ui design Update: We contributed this menu plugin to the jQuery UI library. We got lots of fantastic feedback on our earlier iPod-style menu, and decided to upgrade it for jQuery 1.3.

As noted in our original post, the iPod-style menu provides easy navigation of complex nested structures with any number of levels. Much of the functionality that controls the iPod style menu, like positioning and option selection, is shared by dropdown and flyout menus which are better suited for smaller data sets, so we extended the script to include support for these additional menu types. We also built in the ability to customize a menu's appearance, including active and hover states, by passing in classes as options. By default, the menu script will transform an unordered list of links into a simple dropdown menu: Demo Page When the menu content contains nested lists, by default it creates an iPod-style menu: Demo Page Demo Page How it works. Duck_punching » Passenger (mod_rails) for development. Now with. Articles: Ubuntu Gutsy - Nginx config layout. Assuming you have followed this article and have installed Nginx via the Aptitude package manager, we can now have a look at what the install, um, installed.

If you have used Apache with a debian based layout, you will note some very nice similarities and consistencies. Looksee Let's start by moving to the Nginx directory and listing what is there. cd /etc/nginx ls You will see this: The folders are highlighted in blue. Sites-available Inside here will be files containing the configurations for each site you want to serve. Sudo nano sites-available/default As I say, we'll look in more detail at the actual configuration later. Do note that a file in sites-available does not mean they are active (i.e. your users will not be able to browse to the domain) as you need to enable them first.

Sites-enabled These are symlinks to whichever sites you want to enable. So if you had 5 sites configured and available (i.e. in the sites-available folder), nothing would happen until you enabled them to be served. Installing RMagick on OS X using MacPorts. Revised 16Nov2007 This page describes a method for installing RMagick, ImageMagick, and the delegate libraries used by ImageMagick. I developed this procedure using a clean install of OS X 10.5 (Leopard) on a PowerPC PowerBook G4, but the procedure should be the same for Tiger and Intel Macs. You will need to have your OS X installation disk, a connection to the Internet, and at least an hour of free time (assuming you have a broadband connection). You should also be familiar with the bash shell and the Terminal application. Step 1: Install MacPorts Go to the Installing MacPorts web page and follow the instructions there to install MacPorts. The remainder of these instructions assume that you installed MacPorts using all the defaults.

Step 2: Install ImageMagick and its delegate libraries If you have not already done so, start the Terminal application. Enter this command in a Terminal window. sudo port install tiff -macosx imagemagick +q8 +gs +wmf You'll be prompted for your password. RMagick 2.0.0: RVG Tutorial. A tutorial Introduction RVG (Ruby Vector Graphics) is a facade for RMagick's Draw class that supplies a drawing API based on the Scalable Vector Graphics W3C recommendation.

RVG is a scalable vector drawing library. Scalable means that drawings are not fixed to a single size in pixels. The same drawing can be rendered for a screen display or for printing. Vector images are drawn using geometric objects like lines and circles. Unlike raster images, vector images don't get "pixelated" when you make them bigger. As an introduction to the RVG library, let's see how to draw this little duck on the left. Summary All drawings follow the same 3 steps: Create an RVG object. I'll step through the example line-by-line. Lines 1-3 1 require 'rvg/rvg' 2 include Magick These are just the usual Ruby code to load the RVG extension. Lines 4-6 4 RVG::dpi = 72 5 6 rvg = RVG.new(2.5.in, 2.5.in).viewbox(0,0,250,250) do |canvas| RVG::dpi enables the use of unit methods in RVG. The RVG.new method accepts 2 parameters.

1 Reference Manual :: 11.6 Date and Time Functi. Chart Types - Google Chart API - Google Code.