This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| context.shiftDiff = function(diff) { | |
| if (!arguments.length) shiftDiff = 20 // default | |
| else shiftDiff = diff; | |
| return update(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var context = cubism.context() | |
| .step(1e4) | |
| .size(1440) | |
| .shiftDiff(100); // shiftDiff is now 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| case 37: // left | |
| if (d3.event.shiftKey && focus > shiftDiff) context.focus(focus -= shiftDiff); | |
| else { | |
| if (focus == null) focus = size - 1; | |
| if (focus > 0) context.focus(--focus); | |
| } | |
| break; | |
| case 39: // right | |
| if (d3.event.shiftKey && size - focus > shiftDiff) context.focus(focus += shiftDiff); | |
| else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var context = cubism.context() | |
| .step(1e4) | |
| .size(1440); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var context = cubism.context() | |
| .step(1e4) | |
| .size(1440) | |
| .shiftDiff(200); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Modules | |
| var express = require('express') | |
| , everyauth = require('everyauth') | |
| , connect = require('connect'); | |
| var app = module.exports = express.createServer(); | |
| everyauth.debug = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(42deg, #f06, yellow); | |
| min-height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "Domai.nr" | |
| , "version": "1.0.0" | |
| , "description": "A dead-simple way to utilize Domai.nr's JSON API" | |
| , "keywords": [ | |
| "domainr" | |
| , "domains" | |
| , "search" | |
| , "domain" | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var domainr = require("Domai.nr") | |
| domainr.search("connor montgomery", function(responseFromDomainr) { | |
| // do things with the responseFromDomainr object | |
| }) | |
| domainr.info("cnnr.me", function(responseFromDomainr) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request = require('request') | |
| exports.search = function( query, callback ) { | |
| // more code will go here | |
| } |