Skip to content

Instantly share code, notes, and snippets.

@marnixk
marnixk / pocketbase_stripe_utils.js
Created July 18, 2024 10:15
Pocketbase Stripe Javascript Functions
/*
____ _ _ _ _ _ _ _
/ ___|| |_ _ __(_)_ __ ___ | | | | |_(_) |___
\___ \| __| '__| | '_ \ / _ \ | | | | __| | / __|
___) | |_| | | | |_) | __/ | |_| | |_| | \__ \
|____/ \__|_| |_| .__/ \___| \___/ \__|_|_|___/
|_|
Purpose:
@jordienr
jordienr / tailwind.config.ts
Created July 15, 2023 09:10
Tailwind SVG Grid Background
// Remember to install mini-svg-data-uri
// Follow me on twitter for memes @jordienr
import { type Config } from "tailwindcss";
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
const svgToDataUri = require("mini-svg-data-uri");
export default {
@ssrihari
ssrihari / clojure-learning-list.md
Last active July 20, 2024 10:06
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language

Deployment

Creating and configuring a new site / environment occurs occasionally. Often, to update the underlying server software.

This site has been built with:

@BjornDCode
BjornDCode / gist:5cb836a6b23638d6d02f5cb6ed59a04a
Created February 3, 2020 11:58
Tailwind - Fixed sidebar, scrollable content
// Source: https://twitter.com/calebporzio/status/1151876736931549185
<div class="flex">
<aside class="h-screen sticky top-0">
// Fixed Sidebar
</aside>
<main>
// Content
</main>
import logging
import json
import google.oauth2.credentials
import time
from google.assistant.library import Assistant
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, QThread
from google.assistant.library.event import EventType
@juliendargelos
juliendargelos / lorem-ipsum.js
Last active May 29, 2018 10:14
Generates Lorem Ipsum and provides a lorem-ipsum html element.
// Usage:
//
// Get a Lorem Ipsum with 100 words (default):
// new LoremIpsum().string
// LoremIpsum.string
//
// Get a Lorem Ipsum with 200 words and without starting with "Lorem ipsum dolor sit amet...":
// new LoremIpsum({length: 200, classic: false}).string
// LoremIpsum.generate({length: 200, classic: false})
//
@andreapavoni
andreapavoni / Flexible Dockerized Phoenix Deployments.md
Created May 12, 2018 18:02 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
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

@kirkins
kirkins / Dockerfile
Created April 25, 2018 22:15
A docker file running a simple script to check if a port is open every 15 seconds
FROM alpine
MAINTAINER kirkins@gmail.com
# Checks if a port is open every 15 seconds
# Set the following variables
ENV WEBSITE google.com
ENV PORT 777
ENV PORT_DOWN_MSG 'Port is down send this message via email/text/ect'
@athos
athos / deps.edn
Last active June 2, 2024 08:57
Try on your terminal `clojure -Sdeps '{:deps {hello-clojure/hello-clojure {:git/url "https://gist.github.com/athos/b68b15b08efedffaf14d8c020b125202" :git/sha "099bdf7d565b2c35c1df601abf58514cc5276237"}}}' -M -m hello-clojure`
{:paths ["."]
:deps {clansi/clansi {:mvn/version "1.0.0"}}}