title | description | author | created | updated | ||
---|---|---|---|---|---|---|
{{title}} |
{{description}} |
{{author}} |
|
|
"Code Gen Instruction": { | |
"prefix": "instruction-codegen", | |
"body": [ | |
"\t\"github.copilot.chat.codeGeneration.instructions\": [", | |
"\t\t{", | |
"\t\t\t\"text\": \"use JavaScript for all code. use camelCase for variable names, PascalCase for class names. Use spaces for indentation. Use single quotes for strings. Use 2 spaces for indentation.\"", | |
"\t\t}", | |
"\t]," | |
] |
version: '3.9' | |
services: | |
metabase: | |
image: metabase/metabase:latest | |
container_name: metabase | |
hostname: metabase | |
volumes: | |
- /dev/urandom:/dev/random:ro | |
ports: | |
- 3000:3000 |
# Admin API key goes here | |
KEY="[FIND ME IN THE ADMIN SETTINGS]" | |
# Split the key into ID and SECRET | |
TMPIFS=$IFS | |
IFS=':' read ID SECRET <<< "$KEY" | |
IFS=$TMPIFS | |
# Prepare header and payload | |
NOW=$(date +'%s') |
"nuget": { | |
"prefix": "nuget", | |
"body": [ | |
"\t<PropertyGroup>\t\t", | |
"\t\t<PackageId>$1</PackageId>", | |
"\t\t<PackageVersion>1.0</PackageVersion>", | |
"\t\t<Title>$2</Title>", | |
"\t\t<Authors>Rob Conery</Authors>", | |
"\t\t<Description>$3</Description>", | |
"\t\t<PackageTags>dotnet;</PackageTags>", |
Bottom line: never trust a spreadsheet. You're going to hear me say that a lot in this production! Especially when it comes to dates.
Postgres is pretty good at dealing with dates... in fact it's amazingly powerful as well as correct:
select now(); -- what date and time is it where my server is located?
select now() + '1 day' as tomorrow; -- adding an interval is extremely easy
select now() at time zone 'America/New_York'; -- specifying a timezone
Postgres ships with a powerful binary client, psql
. If you're not a command line person, it can take a little getting used to. It's worth the investment, however, because the speed and scriptability of psql
is extremely powerful.
You can login to your database with a simple command:
psql cassini
Once you're in, you can have a look around and see what's there:
When importing data into Postgres from a CSV, it's imperative that you do not try to alter the data - do that by explicitly transforming the data later on.
That means we need to import everything as text
, because that's the core string type in Postgres (as opposed to varchar
etc).
To create our schema and table:
create schema csvs;
create table csvs.master_plan(
start_time_utc text,
We need to setup our dev environment (quickly) with a few bash commands:
mkdir cassini
cd cassini
mkdir csvs
touch csvs/import.sql
touch README.md
createdb cassini