Skip to content

Instantly share code, notes, and snippets.

View huynguyen's full-sized avatar
😇
Is this the BAD PLACE?

Huy Nguyen huynguyen

😇
Is this the BAD PLACE?
View GitHub Profile
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
for p in rvm-patchsets/patches/ruby/1.9.3/p545/railsexpress/* ; do
patch -p1 < $p
done
}
install_package "yaml-0.1.5" "http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz#24f6093c1e840ca5df2eb09291a1dbf1"
install_package "ruby-1.9.3-p545" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p545.tar.gz#8e8f6e4d7d0bb54e0edf8d9c4120f40c" patch_ruby_railsexpress autoconf standard
ActiveSupport::Notifications.subscribe "sql.active_record" do |name, start, finish, id, payload|
Rails.logger.debug "=============================================="
Rails.logger.debug "SQL: #{payload[:sql]}"
Rails.logger.debug "=============================================="
Rails.logger.debug caller.join("\n")
Rails.logger.debug "=============================================="
end
@huynguyen
huynguyen / README.md
Created December 5, 2012 08:36 — forked from mbostock/.block
Stacked Radial Area

This plot might be suitable for showing cyclical trends, though I'm not sure it’s a great idea as the radial display has a number of limitations:

  • The underlying data goes from Sunday to Saturday, but the chart shows continuity from Saturday through to the previous Sunday. Time does not flow backwards, so you might instead prefer to plot two values for Sunday; this would show a discontinuity on opposite sides of the Sunday axis.

  • Displaying the discontinuity requires an open interpolator, rather than cardinal-closed as used here. However, this causes the tangents of the incoming and outgoing lines to no longer be orthogonal to the axis. To display the discontinuity properly, you’d need to write a custom interpolator to generate the correct tangents.

  • Due to the interpolation taking place in Cartesian (rather than polar) coordinates, the intermediate values of the lines do not have the correct radial values: if you tried to measure t

@huynguyen
huynguyen / index.html
Created December 5, 2012 08:08 — forked from jeffthink/index.html
Simple d3 Radar Chart
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Simple Radar Chart</title>
<link rel="stylesheet" href="style.css"/>
<script src="http://mbostock.github.com/d3/d3.js?2.5.0"></script>
<script src="radar.js"></script>
</head><body><h1>Simple Radar Chart</h1>
<div id="viz">
</div>