This guide is based on the very informative discussion in this article: Using node_sqlite3 with Electron
Install sqlite3
npm install sqlite3 --save
| # Download the VDI from https://cdn.amazonlinux.com/os-images/latest/ | |
| # Doc is at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html | |
| # Be sure you have config/meta-data and config/user-data ready as per the below | |
| # change ec2-user's password to your password | |
| $ cat config/meta-data | |
| local-hostname: amazonlinux.onprem | |
| # eth0 is the default network interface enabled in the image. You can configure |
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "os/exec" | |
| bf "gopkg.in/russross/blackfriday.v2" | |
| ) |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| // Name of the struct tag used in examples | |
| const tagName = "validate" |
This guide is based on the very informative discussion in this article: Using node_sqlite3 with Electron
Install sqlite3
npm install sqlite3 --save
| find ~/Library/Developer/CoreSimulator/Devices/ -name device.plist -exec sh -c "/usr/libexec/PlistBuddy -c \"print UDID\" '{}' | tr '\n' ' '" \; -exec sh -c "/usr/libexec/PlistBuddy -c \"print name\" '{}' | tr '\n' ' '" \; -exec sh -c "/usr/libexec/PlistBuddy -c \"print runtime\" '{}' | sed -n 's/com\.apple\.CoreSimulator.SimRuntime\.\(.*\)/\1/p'" \; |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)