Based on http://bl.ocks.org/mbostock/899711 which uses D3 to draw elements into a google maps overlay layer, but doesn't use d3.geo machinery to draw map geometry. This gist illustrates how to align a D3 mercator projection with google maps so we can do standard d3 mapping stuff on top of the google API.
| $ cat test.js | |
| function foo () { while (true) { } } | |
| function bar () { return foo(); } | |
| bar(); | |
| $ node test.js & | |
| $ gdb attach $(pidof node) | |
| 0x00000bf778c63d5f in ?? () | |
| (gdb) b v8::internal::Runtime_StackGuard | |
| Breakpoint 1 at 0x84a1f0 | |
| (gdb) print 'v8::V8::TerminateExecution'(0) |
Avi Flax wrote a very interesting article about Profiling Node Programs on Mac OS X. However, if you manage your Node.js installation with homebrew, you can use the following hints to install the V8 debugger separately and run it using node-profile or coffee-profile.
I'm forking the gist https://gist.github.com/fhemberger/2000999 because the install.sh didn't work for me. so i'm documenting how I did itmanually)#
| This document is outdated. | |
| You should read David Bryant Copeland's excellent online book: http://angular-rails.com/crud_recipe.html | |
| --------------------------------------------------------------------------------------------------------------- | |
| I think it's better to install javascript/css libraries using Bower rather than gem which is Ruby packager. | |
| 1. Install Rails 4 and create a new project. | |
| 2. Install bower(Note you need to install node first.) | |
| sudo npm install -g bower |
When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.
In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:
| on run argv | |
| (* | |
| Toggle an application from full screen to non full screen (or the reverse). | |
| Parameters: | |
| 1: application name(ie, Chrome) | |
| 2: boolean (true/false). | |
| When true ensure that the application is in full screen mode (if not, make it so) | |
| When false ensure that the application is NOT in full screen mode (if not, make it so) | |
| *) | |
| set theapp to item 1 of argv |
| import edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D; | |
| public class FftTest { | |
| public static void main(String[] args) { | |
| double[] input = new double[]{ | |
| 0.0176, | |
| -0.0620, | |
| 0.2467, | |
| 0.4599, | |
| -0.0582, |
| #!/bin/bash | |
| # ssh-multi | |
| # D.Kovalov | |
| # Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
| # a script to ssh multiple servers over multiple tmux panes | |
| starttmux() { | |
| if [ -z "$HOSTS" ]; then |
| function git_prompt_info() { | |
| ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
| echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
| } |