Node Roundup: hotcode, fbgraph, browser
You can send your node modules and articles in for review through our contact form or @dailyjs.
hotcode

hotcode (License: MIT, npm: hotcode) by Mathias Pettersson is a small Express app that watches for changes on a given path, then reloads an associated app when files change.
To use it, follow the instructions in the project’s README file. When hotcode is run it’ll print out a link to some JavaScript (it should be http://127.0.0.1:8080/static/injected.js) — this will need to be added to your project to get automatic reloading in the browser.
Projects can be configured in ~/.hotcode so the path doesn’t need to be entered each time hotcode is started. This can be set per-domain as well.
One of the interesting things about hotcode is it can be run against practically any app in any language. If you’re sick of having to restart your app and refresh the browser every time you make a change, then you’re going to love this.
fbgraph
fbgraph (GitHub: criso / fbgraph, License: MIT, npm: fbgraph) by Cristiano Oliveira provides consistent access to the Facebook graph API. According to the author:
All calls will return json. Facebook sometimes decides to just return a
stringortrueor redirects directly to an image.
Given suitable configuration options, people can be authorised using getOauthUrl:
var graph = require('fbgraph')
, authUrl = graph.getOauthUrl({
'client_id': conf.client_id
, 'redirect_uri': conf.redirect_uri
});
Once the Facebook dialog has been displayed, graph.authorize is called to complete the process and get the access token.
API calls are made with graph.get or graph.post, so most of the API is oriented around HTTP methods:
graph.get('zuck', function(err, res) {
console.log(res); // { id: '4', name: 'Mark Zuckerberg'... }
});
graph.post(userId + '/feed', wallPost, function(err, res) {
// returns the post id
console.log(res); // { id: xxxxx}
});
This is a clean, well-documented, and well-tested Facebook library, which is surprisingly refreshing.
browser
browser (License: MIT, npm: browser) by Shin Suzuki is an event-based library for browsing and scraping URLs, whilst maintaining cookies. Requests are built up using the library’s object, and then triggered with .run():
var $b = require('browser');
$b.browse('https://example.com/');
$b.run();
Building up a sequence of events is possible with the after method:
var $b = require('browser');
$b.browse('https://example.com/sign-in');
$b.browse('https://example.com/account')
.after(); // browse after previously registered function
$b.run();
Event callbacks can also be registered:
$b.on('end', function(err, res) {
});
Now load up jsdom and you’ll be able to scrape faster than you can say “deep-linking lawsuit”!
A Lannister Always Spays His Pets [Pic]
Shared by Michael
A Lannister always spays his pets

I put this flyer up at my local pet store. Thanks to Tyrion from Game of Thrones for offering his endorsement.
[Source: Pleated Jeans]
Related posts:
- Comparing Famous Robots [Pic]
- Game of Thrones Season 2 Teaser
- Oh Yummy: Game of Thrones Cupcakes [Pic]
Investing

Supporting Developers on Stack Overflow
Today we are excited to launch facebook.stackoverflow.com, a partnership with programming Q&A site Stack Overflow to support Facebook Platform developers. Many Facebook engineers actively participate on Stack Overflow, along with some of the most knowledgeable Facebook developers, making it one of the best places for you to get help with your technical questions.
This partnership replaces our existing forums, which, while worked effectively at the beginning of Platform, have begun to show their age. We spent many months looking at the right long-term solution and decided that a partnership with one of the best technical Q&A sites on the Web was the best approach for our community.
To get started, click on the Q&A link on the Support page on the Developer Site or visit facebook.stackoverflow.com. You will see a Facebook-tag filtered view of questions:

To begin asking or answering questions, log in with your Facebook account by clicking on the Login button on the right-hand side or on the top banner found on a Question page:

You can also log in with your existing Stack Overflow account and add your Facebook login information to it. As you participate, you achieve more points and increase your reputation in the community.

Reputation is a rough measurement of how much the community trusts you. The higher reputation you earn, the more privileges you gain on Stack Overflow. To learn more about Stack Overflow, review their mission and FAQ.
Questions added to Documentation
Relevant questions from Stack Overflow will soon be displayed in our docs. A section at the bottom of each API method doc will display the top five questions, sorted by the number of votes:

This feature rolling out slowly over the next few weeks.
Getting support from Facebook
With this move, we decided to make our Developer Forum “read-only” after September 1 in order to better support you on Stack Overflow. A banner has been placed at the top of the Forum encouraging you to post all new questions on Stack Overflow.
If you’d like to continue participating in the developer community, join us in the Facebook Developers Group, where the Developer Relations team is going to be hanging out.
Moving forward, Stack Overflow is where you’ll go to have your Facebook Platform questions answered; Bugs is where you go to report an issue with a legitimate repro, and you should participate in the Group to discuss, chat, and talk with us directly.
Weekly stats
As part of Operation Developer Love, we will now report the number of questions asked/answered and tagged “facebook” on Stack Overflow instead of stats from the Developer Forum on our weekly Platform Updates.
We look forward to your technical questions on Stack Overflow. Please share any feedback in the Comments below.
What is up with Noises? The Science and Math of Sound [Video]
Vi Hart, mathemusician and the adorably geeky voice behind Squiggle Inception featured here recently, has a new video which discusses the science and mathematics of sound.
Check out Vi Hart’s other videos (all worth a peek) on her YouTube channel.
Related posts:
- The Reason Why Everyone Needs to Learn Science and Math
- The Science Behind your TV Sound System
- Math Blaster: Rated “M” For Math [Cartoon]
Teenager Uses Fibonacci Sequence to Improve Solar Panels

How can we make solar panels work up to 50% better? Thirteen-year-old teenager named Aidan Dwyer discovered how trees use math in order to maximize photosynthesis, and thought that it could well be applied towards solar panels:
On a bleak winter hiking trip to the Catskill Mountains, the 7th-grader from New York noticed a pattern among tree branches, and determined (as naturalist Charles Bonnet did in 1754) that the pattern represented the Fibonacci sequence of numbers. Aidan wondered why, and figured it had something to do with photosynthesis.
In a pretty innovative experiment, this intrepid young scientist set about duplicating an oak tree, comparing its sunlight-capturing abilities to a traditional rooftop solar panel array. [...] the short story is that his tree design generated much more electricity — especially during the winter solstice, when the sun is at its lowest point in the sky. At that point, the tree design generated 50 percent more power, without any adjustments to its declination angle.
He determined the tree’s Fibonacci pattern allowed some solar panels to collect sunlight even if others were in shade, and prevented branches on a tree from shading other branches.
[Source]
Related posts:
- The Solar Billionaires: Who’s Made Mad Money off of Solar Power?
- Solar Revolution: MIT develops new method for storing solar energy
- Sexy Fibonacci Spiral [Pic]
Historical Thursday: The Living Bridges of Cherrapunji
In an remote corner of Northeast India lives an indigenous tribal people who have been mostly left alone until the past hundred years. Without the amenities of modern technology or engineering, the War-Khasi people have designed an absolutely ingenious way to cross rivers and gulches; manipulating living tree roots to form natural bridges.

The Ficus elastica is a type of rubber tree native to the region. In addition to their massive size and manipulability, the trees have a secondary root system that is essential to the construction of the bridges. They grow out from higher up in the trunk due to their tendency to live above water sources and dip far down into the rivers. Hundreds of years ago, the Khasi people realized the potential benefit of these roots and began to shape them to their advantage.

By taking the trunks of betel nut trees, hollowing them out and cutting in them in half, the tribespeople show the roots where they want them to grow. As the roots slowly grow in search of water, their path continues down the inside of the betel trunk, across the length of the river or ravine. One they arrive at their destination, they’re allowed to dig into the soil and grow strong, and do they ever grow strong.
After about 10-15 years of traveling across the river, the root bridges can eventually hold over 5,000 pounds of weight. Some of them are up to 100 feet in length and the oldest of the bunch is believed to have been constructed around the 16th century.

In recent years, the Khasis actually wanted to get with the times and tear down the bridges to make way for steel ones. It wasn’t until a local resort owner stepped in and realized the worth of these ancient marvels. He convinced them to keep them up and began to photograph them to show the bridges off to the world. Some of them are absolutely stunning, but most magnificent of them all is the Umshiang Double-Decker, shown below.

The Khasis even recently started to grow another bridge, perfect for the trip I’m planning a decade from now.
Enjoyed what you read? Check out all whole compendium of Historical Thursdays!
Pictures and Information courtesy of: Atlas Obscura and Tree Hugger.
As always, if YOU have an idea for a Historical Thursday, let me know at thereifixedit@gmail.com
Tattoo


