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
    
  
  
    
  | #!/usr/bin/env bash | |
| echo $BASH_VERSION | |
| # GVM readme: https://github.com/e-nikolov/gvm/blob/master/README.md | |
| bash < <(curl -s -S -L https://raw.githubusercontent.com/e-nikolov/gvm/master/binscripts/gvm-installer) | |
| source $HOME/.gvm/scripts/gvm | |
| gvm install go1.6 --prefer-binary | |
| gvm install go1.6.2 --prefer-binary | 
  
    
      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
    
  
  
    
  | FILENAME=$(basename $(pwd)) | |
| go test -run=. -bench=. -cpuprofile=cpu.out -benchmem -memprofile=mem.out -trace trace.out | |
| go tool pprof -pdf $FILENAME.test cpu.out > cpu.pdf && open cpu.pdf | |
| go tool pprof -pdf --alloc_space $FILENAME.test mem.out > alloc_space.pdf && open alloc_space.pdf | |
| go tool pprof -pdf --alloc_objects $FILENAME.test mem.out > alloc_objects.pdf && open alloc_objects.pdf | |
| go tool pprof -pdf --inuse_space $FILENAME.test mem.out > inuse_space.pdf && open inuse_space.pdf | |
| go tool pprof -pdf --inuse_objects $FILENAME.test mem.out > inuse_objects.pdf && open inuse_objects.pdf | |
| go tool trace trace.out | |
| go-torch $FILENAME.test cpu.out -f ${FILENAME}_cpu.svg && open ${FILENAME}_cpu.svg | 
  
    
      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
    
  
  
    
  | /************************************************* | |
| Parametric two-part mold generator | |
| Author: Jason Webb | |
| Website: http://cs.unk.edu/~webb | |
| Last update: 10/1/2012 | |
| A parametric two-part mold generator that constructs two- | |
| part molds with registration marks based on STL files. | |
| USAGE: | 
  
    
      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 db = mongoose.connect('mongodb://localhost:27017/DB'); | |
| // In middleware | |
| app.use(function (req, res, next) { | |
| // action after response | |
| var afterResponse = function() { | |
| logger.info({req: req}, "End request"); | |
| // any other clean ups |