Skip to content

Instantly share code, notes, and snippets.

View robconery's full-sized avatar
🤩

Rob Conery robconery

🤩
View GitHub Profile
@robconery
robconery / AGENTS.md
Created October 20, 2025 09:33
Contoso Mail intstructions

Project Info

This is the Contoso Mailer project that is currently using Dapper and I want to roll it over to Entity Framework.

Considerations

I want to move very slowly, with one change being a single git commit, one iteration being a single push to GitHub dev branch.

Guidelines

NEVER edit package.json directly ALWAYS use npm install

@robconery
robconery / markdown.code-snippets
Last active October 3, 2025 19:39
Code style Snippets
//drop this file into your .vscode directory for local snippets
{
"JS Styles": {
"scope": "markdown",
"prefix": "style-js",
"body": [
"# Javascript",
"",
"This project uses JavaScript with the following styles:",
"",
@robconery
robconery / Book.md
Last active October 29, 2025 13:06
Obsidian Bujo Templates
title description author created updated
{{title}}
{{description}}
{{author}}
{"DATE:YYYY-MM-DD HH:mm:ss" => nil}
{"DATE:YYYY-MM-DD HH:mm:ss" => nil}

cover|150

@robconery
robconery / foo.md
Created July 31, 2024 19:31
Thingy #rob

Something Amazing

@robconery
robconery / docker-compose.yml
Created May 6, 2024 01:35
Metabase Docker Compose
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')
@robconery
robconery / csproj-snippet.json
Last active November 17, 2023 05:10
.NET Template JSON
"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>",
@robconery
robconery / sql-05-tangent-dates.md
Created September 28, 2023 18:11
SQL Tangent Dates

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
@robconery
robconery / sql-04-extraction-inspect.md
Created September 28, 2023 00:22
SQL Extraction Inspect

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:

@robconery
robconery / sql-03-extraction-import.md
Created September 28, 2023 00:21
SQL Extraction Import

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,