my_json = JSON.parse(File.open("ss_to_census_100k_all_unique_results.json").read);
csv_string = CSV.generate(headers: true) do |csv|
csv << my_json.first.keys
my_json.each do |hash|
csv << hash.values
end
end;
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
| git pull origin $(git rev-parse --abbrev-ref HEAD) |
On VM run
sudo apt-get install openssh-server openssh-client
ifconfig
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
| 1. Add Storage | |
| 2. Display is VBOXSVGA @ 90MB | |
| 3. Add Network adapter 2 as HostOnly, promiscuous deny | |
| 4. Mount shared folder/drive in settings (may need to do some terminal commands to automount here) | |
| 5. Add self to sudo and root group `sudo adduser john sudo` and `sudo usermod -a -G root john` | |
| 6. Install posgres and also `sudo apt-get install libpq-dev` | |
| 7. Install RBENV, and reshash it | |
| 8. | |
Insted of using .gitignore add files to .git/info/exclude
code .git/info/excludeIf you already have files that are changed you'll need to set them as unchanged
git update-index --assume-unchanged .gitmodules
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
| select n.nspname as enum_schema, | |
| t.typname as enum_name, | |
| e.enumlabel as enum_value | |
| from pg_type t | |
| join pg_enum e on t.oid = e.enumtypid | |
| join pg_catalog.pg_namespace n ON n.oid = t.typnamespace |
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
| git for-each-ref --sort='-committerdate:iso8601' --format=' %(committerdate:iso8601)%09%(refname)' refs/heads |
Version 9.6: sudo apt-get install postgresql-9.6 postgresql-contrib
sudo su - postgrescreateuser --interactive --pwprompt -p 5434where 5434 is the port of your PG cluster
sudo su - postgres
psql
CREATE USER railsuser WITH PASSWORD 'railsuser' SUPERUSER CREATEDB;
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
| git log -p -- Gemfile |