Skip to content

Instantly share code, notes, and snippets.

View cpursley's full-sized avatar

Chase Pursley cpursley

View GitHub Profile
@goblinJoel
goblinJoel / app.js
Last active February 28, 2024 22:13
LiveSelect test page
// We need to import the CSS so that webpack will load it.
// The MiniCssExtractPlugin is used to separate it out into
// its own CSS file.
import "../css/app.css"
// webpack automatically bundles all modules in your
// entry points. Those entry points can be configured
// in "webpack.config.js".
//
// Import deps with the dep name or local files with a relative path, for example:
@ryancurtin
ryancurtin / scout_apm_absinthe_plug.ex
Last active December 18, 2021 14:52 — forked from percygrunwald/scout_apm_absinthe_plug.ex
Scout Absinthe (GraphQL) Instrumentation
defmodule ReaperWeb.Plugs.ScoutApmAbsinthe do
@moduledoc """
This plug allows us to add context to our GraphQL requests in Scout.
We are intuiting the operation name from the query itself and attaching it
to a Scout layer
"""
alias ScoutApm.Internal.Layer
alias Reaper.MetaLogger, as: Logger
@mjf
mjf / Postgres.md
Last active April 30, 2024 08:41
Postgres

⚠️ WARNING
The ordering of listed projects or documents is random and has no connection to relevance or maturity levels!

Postgres

Extensions

Extension Description
pgaudit Postgres auditing extension
pg_auto_failover Postgres extension for failover without distributed consensus (by Citus Data)
@PhilipSchmid
PhilipSchmid / minio-upload.sh
Created November 19, 2020 13:38
Upload data to Minio using CURL
#!/bin/bash
# Usage: ./minio-upload my-bucket my-file.zip
bucket=$1
file=$2
host=minio.example.com
s3_key=svc_example_user
s3_secret=svc_example_user_password
@pramsey
pramsey / 0-spatial-sql-postgis.md
Last active November 13, 2023 18:33
Spatial SQL and PostGIS
@kinlane
kinlane / QuickBooks Online V3 API OpenAPI.json
Created August 17, 2018 02:18
QuickBooks Online V3 API OpenAPI
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "QuickBooks Online V3API Collections - OAuth2",
"description": "The QuickBooks Online Accounting API is a RESTful API that is used to access QuickBooks companies.\n\nDocs Ref - https://developer.intuit.com/docs/api/accounting"
},
"host": "DefaultParameterValue",
"basePath": "/v3/company/DefaultParameterValue",
"securityDefinitions": {
@jswny
jswny / Flexible Dockerized Phoenix Deployments.md
Last active July 3, 2023 05:25
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

@AtulKsol
AtulKsol / db_backup_commands.md
Last active April 25, 2024 14:36
Commands to backup & restore database
  1. pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
    Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql

    Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql

    -h is for host.
    -p is for port.
    -U is for username.
    -d is for database.

@Trevoke
Trevoke / adams-heroku-values.md
Created September 14, 2017 16:18 — forked from adamwiggins/adams-heroku-values.md
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style