Skip to content

Instantly share code, notes, and snippets.

View sourdoughdev's full-sized avatar
🍞
bread & coffee

Thomas Edgesmith sourdoughdev

🍞
bread & coffee
View GitHub Profile
@sourdoughdev
sourdoughdev / ci.yml
Created November 13, 2022 17:53
Speeding up Phoenix (Elixir) GitHub Action CI
on: push
name: "CI"
env:
MIX_ENV: test
jobs:
dependencies:
runs-on: ubuntu-latest
strategy:
@sourdoughdev
sourdoughdev / ci.yml
Created July 18, 2022 03:00
Phoenix Elixir CI
on: push
name: "CI"
env:
MIX_ENV: test
jobs:
dependencies:
runs-on: ubuntu-latest
strategy:
@sourdoughdev
sourdoughdev / phx_sqlite_fly_launch.md
Created July 1, 2022 15:25 — forked from mcrumm/phx_sqlite_fly_launch.md
Phoenix + SQLite Deployment tips

Deploying to Fly.io with SQLite

Deploying a Phoenix app to Fly.io is a breeze...is what everyone kept telling me. In fairness, I imagine the process would have been breezier had I just used postgres, but all the sqlite and litestream talk has been far too intriguing to ignore. "Wait", you say. "It is just a flat file. How much harder can it be?"

It is easy to make something harder than it should be. It is hard to take something complex and make it truly simple. flyctl launch does an amazing job at providing a simple interface to the utterly complex task of generating deployment resources, especially now that we are living in a containerd (erm, firecracker) world.

This gist is for anyone who, like me, thinks they know better than to read all of the documentation and therefore necessari

@sourdoughdev
sourdoughdev / id.txt
Last active January 13, 2022 21:50
Ecto ULID support with downcasing + prefixing
org_01fsab1yp4zh97q2pnj7p6x73x
@sourdoughdev
sourdoughdev / config.exs
Last active October 20, 2023 07:55
Connecting to PlanetScale DB from Phoenix (elixir)
hostname = "random-host-name.region.psdb.cloud"
{:ok, pid} = MyXQL.start_link(username: "random-username",
database: "db_name",
hostname: hostname,
password: "************",
ssl: true,
ssl_opts: [
verify: :verify_peer,
cacertfile: CAStore.file_path(),

This is a test

@sourdoughdev
sourdoughdev / cloudSettings
Last active April 19, 2020 17:27
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-19T17:27:55.447Z","extensionVersion":"v3.4.3"}
{
"draw_minimap_border": true,
"draw_white_space": "all",
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
@sourdoughdev
sourdoughdev / App.tsx
Created August 3, 2019 15:39 — forked from tamcgoey/App.tsx
Inbox for Trello. A super simple React Native app: https://sourdough.dev/crafting-your-own-tools
import axios from 'axios'; // yarn add axios
import React, { useState } from 'react';
import {
View,
StatusBar,
TextInput,
ToastAndroid,
Text,
TouchableHighlight,
TouchableOpacity
<?php
/*
_______ _ _ __ __ _ __ _
|__ __| | | | \ \ / / | | / _| |
| |_ __ ___| | | ___ \ \ /\ / /__ _ __| | _| |_| | _____ __
| | '__/ _ \ | |/ _ \ \ \/ \/ / _ \| '__| |/ / _| |/ _ \ \ /\ / /
| | | | __/ | | (_) | \ /\ / (_) | | | <| | | | (_) \ V V /
|_|_| \___|_|_|\___/ \/ \/ \___/|_| |_|\_\_| |_|\___/ \_/\_/