Skip to content

Instantly share code, notes, and snippets.

View jpinnix's full-sized avatar

Jeremy Pinnix jpinnix

View GitHub Profile
jpinnix / gist:ac4acdc6ced541897039fcb253542b88
Created December 28, 2021 08:22 — forked from y-gagar1n/gist:8469484
DateTime format patterns
DateTime.ToString() Patterns
All the patterns:
0 MM/dd/yyyy 08/22/2006
1 dddd, dd MMMM yyyy Tuesday, 22 August 2006
2 dddd, dd MMMM yyyy HH:mm Tuesday, 22 August 2006 06:30
3 dddd, dd MMMM yyyy hh:mm tt Tuesday, 22 August 2006 06:30 AM
4 dddd, dd MMMM yyyy H:mm Tuesday, 22 August 2006 6:30
5 dddd, dd MMMM yyyy h:mm tt Tuesday, 22 August 2006 6:30 AM
jpinnix /
Created September 22, 2021 19:00 — forked from dpapathanasiou/
How to use SchemaSpy to generate the db schema diagram for a PostgreSQL database

SchemaSpy is a neat tool to produce visual diagrams for most relational databases.

Here's how to use it to generate schema relationship diagrams for PostgreSQL databases:

  1. Download the jar file from here (the current version is v6.1.0)

  2. Get the PostgreSQL JDBC driver (unless your installed version of java is really old, use the latest JDBC4 jar file)

  3. Run the command against an existing database. For most databases, the schema (-s option) we are interested in is the public one:

jpinnix / AppleLogo.swift
Created June 16, 2021 21:28 — forked from jordansinger/AppleLogo.swift
Original Apple logo in SwiftUI
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(spacing: 0) {
jpinnix /
Created June 16, 2021 20:46 — forked from kylestratis/
Appscript to generate an email when setting "Added to Roam" column to TRUE. Only works with gmail address
// This constant is written in column C for rows for which an email
// has been sent successfully.
var ADDED = true;
var EMAIL_SENT = true;
* Sends non-duplicate emails with data from the current spreadsheet.
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
jpinnix /
Created May 14, 2021 18:14 — forked from vimtaai/
Comparison of features in various Markdown flavors

Comparison of syntax extensions in Markdown flavors

I created a crude comparison of the syntax of the various common Markdown extensions to have a better view on what are the most common extensions and what is the most widely accepted syntax for them. The list of Markdown flavors that I looked at was based on the list found on CommonMark's GitHub Wiki.

Flavor Superscript Subscript Deletion*
Insertion* Highlight* Footnote Task list Table Abbr Deflist Smart typo TOC Math Math Block Mermaid
jpinnix / Play-Button.cs
Created March 14, 2021 21:36 — forked from c3founder/Play-Button.cs
Responsive YouTube Player and YouTube Timestamp for Roamresearch
background-color: rgba(108,109,36,0.1);
color: rgb(251,106,13);
margin-right: 8px;
margin-top: 0px;
margin-left: 0px;
margin-bottom: 5px;
border-radius: 50% !important;
border-style: inset;
jpinnix /
Created September 21, 2020 17:57 — forked from edsu/
Try to get replies to a particular set of tweets, recursively.
#!/usr/bin/env python
Twitter's API doesn't allow you to get replies to a particular tweet. Strange
but true. But you can use Twitter's Search API to search for tweets that are
directed at a particular user, and then search through the results to see if
any are replies to a given tweet. You probably are also interested in the
replies to any replies as well, so the process is recursive. The big caveat
here is that the search API only returns results for the last 7 days. So
jpinnix / add_favicons.js
Created September 4, 2020 13:51 — forked from ottsch/add_favicons.js
Add favicon to links
const addFavicons = () => {
let filtered ='.roam-body-main a'), a => {
return a.hostname && a.hostname !== document.location.hostname;
});, a => {
if (a.text == "*") { = `url(${a.hostname}) right center no-repeat`; = "18px";
} else { = `url(${a.hostname}) left center no-repeat`;
jpinnix / quote.txt
Created August 9, 2020 21:22 — forked from OnesimusUnbound/quote.txt
Programming Quotes
[T]he difference between a bad programmer and a
good one is whether he considers his code or his
data structures more important. Bad programmers
worry about the code. Good programmers worry about
data structures and their relationships.
-- Linus Torvalds
Clarity and brevity sometimes are at odds.
When they are, I choose clarity.
-- Jacob Kaplan-Moss

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by