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
| # NVM Initialization... | |
| # place this after nvm initialization! | |
| autoload -U add-zsh-hook | |
| load-nvmrc() { | |
| package_node_version="$(node -p "require('./package.json').engines.node")" >/dev/null 2>&1 | |
| if [ -n "$package_node_version" ]; then | |
| echo "Detected node version $package_node_version in package.json" | |
| nvm use $package_node_version |
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
| export CLICOLOR=1 | |
| export LSCOLORS=GxFxCxDxBxegedabagaced |
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
| const path = require('path'); | |
| const fs = require('fs'); | |
| const csv_parse = require('csv-parse'); | |
| const sqlite3 = require('sqlite3').verbose(); | |
| const db = new sqlite3.Database(':memory:'); | |
| function loadDataFile(dataFile, tableName, fileOptions={}) { | |
| const startTime = new Date(); | |
| // read CSV file |
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
| <% columns = records.klass.columns.map {|col| col.name} %> | |
| <% columns = columns - blacklist if defined? blacklist %> | |
| <table class="table table-bordered table-striped"> | |
| <tr> | |
| <% columns.each do |col| %> | |
| <th><%= records.klass.human_attribute_name col %></th> | |
| <% end %> | |
| <% helpers.each do |helper| %> | |
| <th><%= records.klass.human_attribute_name helper %></th> | |
| <% end %> |