This example demonstrates how to add visible and draggable handles to D3’s d3.svg.brush component, rather than that relying on the invisible boundary of the brush extent. The handle sizes here are exaggerated for demonstration purposes!
  
    
      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
    
  
  
    
  | files: | |
| /etc/nginx/conf.d/gzstatic.conf: | |
| content: | | |
| server { | |
| server_name www.urcourz.com; | |
| listen 8080; | |
| location ~* \.(js|css|html)$ { | |
| root /var/app/current/public; | |
| } | 
  
    
      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
    
  
  
    
  | /* app.js file. Main file where the Express app is initialized */ | |
| ... | |
| // All the requests except for our external API go through the same route and render index.js | |
| app.get(/^((?!\/api\/).)/, csrf, routes.index); | |
| ... | |
| /* index.js */ | |
| var newrelic = require('newrelic'); | 
  
    
      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
    
  
  
    
  | # mod_deflate configuration | |
| <IfModule mod_deflate.c> | |
| # Restrict compression to these MIME types | |
| AddOutputFilterByType DEFLATE text/plain | |
| AddOutputFilterByType DEFLATE text/html | |
| AddOutputFilterByType DEFLATE application/xhtml+xml | |
| AddOutputFilterByType DEFLATE text/xml | |
| AddOutputFilterByType DEFLATE application/xml | |
| AddOutputFilterByType DEFLATE application/xml+rss | |
| AddOutputFilterByType DEFLATE application/x-javascript | 
  
    
      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
    
  
  
    
  | // directly uploads to S3 | |
| // See http://philfreo.com/blog/how-to-allow-direct-file-uploads-from-javascript-to-amazon-s3-signed-by-python/ | |
| // See https://github.com/elasticsales/s3upload-coffee-javascript | |
| editors.Filepicker = editors.Text.extend({ | |
| tagName: 'div', | |
| events: { | |
| 'change input[type=file]': 'uploadFile', | 
  
    
      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
    
  
  
    
  | (function addXhrProgressEvent($) { | |
| var originalXhr = $.ajaxSettings.xhr; | |
| $.ajaxSetup({ | |
| progress: function() { console.log("standard progress callback"); }, | |
| xhr: function() { | |
| var req = originalXhr(), that = this; | |
| if (req) { | |
| if (typeof req.addEventListener == "function") { | |
| req.addEventListener("progress", function(evt) { | |
| that.progress(evt); | 
  
    
      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
    
  
  
    
  | // Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
| var fs = require('fs'); | |
| var AWS = require('aws-sdk'); | |
| AWS.config.loadFromPath('./aws-config.json'); | |
| var s3 = new AWS.S3(); | |
| // File | |
| var fileName = '5.pdf'; | |
| var filePath = './' + fileName; | |
| var fileKey = fileName; | 
  
    
      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 o = $({}); | |
| $.subscribe = o.on.bind(o); | |
| $.publish = o.trigger.bind(o); | 
  
    
      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
    
  
  
    
  | set nocompatible " Disable vi-compatibility | |
| set t_Co=256 | |
| colorscheme xoria256 | |
| set guifont=menlo\ for\ powerline:h16 | |
| set guioptions-=T " Removes top toolbar | |
| set guioptions-=r " Removes right hand scroll bar | |
| set go-=L " Removes left hand scroll bar | |
| set linespace=15 | 
  
    
      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
    
  
  
    
  | describe 'App.HeaderModule', -> | |
| beforeEach -> | |
| @headerModule = window.App.HeaderModule | |
| it 'should exist', -> | |
| expect(@headerModule).not.toBeUndefined() | |
| describe 'starting', -> |