Skip to content

Instantly share code, notes, and snippets.

View chopfitzroy's full-sized avatar
👽
What are we if not plural?

Otis Sutton chopfitzroy

👽
What are we if not plural?
View GitHub Profile
@arunmmanoharan
arunmmanoharan / useFetcherWithReset.ts
Last active October 18, 2024 20:16
Remix Fetcher With Reset
import type { FetcherWithComponents } from "@remix-run/react";
import { useFetcher } from "@remix-run/react";
import { useEffect, useState } from "react";
import type { AppData } from "@remix-run/react/dist/data";
import type { SerializeFrom } from "@remix-run/server-runtime";
/**
* A higher-order function that creates a new FetcherWithComponentsReset instance, which extends the FetcherWithComponents interface.
* The new instance includes an additional method `reset` that can be used to reset the state of the fetcher.
*
@mcrumm
mcrumm / phx_sqlite_fly_launch.md
Last active November 7, 2024 20:37
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

@alyleite
alyleite / wsl.md
Last active August 9, 2024 01:45
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

==============================================

Edit*

  1. Open /etc/wsl.conf with any editor:
@fardjad
fardjad / minikube-on-wsl2-with-podman.md
Last active June 3, 2024 13:48
[Minikube on WSL2 with Podman] Tips for running a local development Kubernetes cluster on WSL2 with Podman #wsl2 #minikube #podman #kubernetes #docker
@remylagerweij
remylagerweij / podcast-specs.xml
Created April 9, 2020 09:58
Podcast - RSS Specification
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0">
<channel>
<title>Podcast Title</title>
<atom:link href="https://www.mypodcastfeed.com/feed/podcast/" rel="self" type="application/rss+xml" />
<link>https://www.podcasturl.com</link>
<description>Podcast description</description>
<lastBuildDate>Fri, 19 Jan 2018 01:45:39 +0000</lastBuildDate>
<language>en-US</language>
<copyright />
version: "3.6"
services:
# Traefik Reverse Proxy Engine
traefik:
hostname: traefik
image: traefik:latest
container_name: traefik
restart: always
domainname: ${DOMAINNAME}
@carlolars
carlolars / .wsl-git.md
Last active October 29, 2024 07:25
HOWTO: Use WSL and its Git in a mixed development environment

How to setup a development environment where Git from WSL integrates with native Windows applications, using the Windows home folder as the WSL home and using Git from WSL for all tools.

Note if using Git for Windows, or any tool on the Windows side that does not use Git from WSL then there will likely be problems with file permissions if using those files from inside WSL.

Tools

These are the tools I use:

  • git (wsl) - Command line git from within WSL.
  • Fork (windows) - Git GUI (must be used with wslgit)
  • wslgit - Makes git from WSL available for Windows applications. Important! Follow the installation instructions and do (at least) the first optional step and then the Usage in Fork instructions.
<style>
/* BASE RULES */
html, body {
width: 100%;
height: 100%;
background-color: #ccccff;
}
div {
@sergey-shpak
sergey-shpak / computed.js
Last active September 26, 2019 21:02
Hyperapp V2 computed properties
/*
Implements computed properties for Hyperapp#v2
It's not recomended approach to use
unless you really know what you're doing
Usage examples:
// action is triggered whenever state.property updated*
@fnky
fnky / ANSI.md
Last active November 18, 2024 06:36
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27