Skip to content

Instantly share code, notes, and snippets.

View DavidJFelix's full-sized avatar
🏷️
tagged

David J. Felix DavidJFelix

🏷️
tagged
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 11, 2024 11:39
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
#!/usr/bin/env python3
import PIL.Image
from PIL import ImageSequence
import wand.image
from io import BytesIO, RawIOBase
def gmagik(gif: PIL.Image.Image, out: RawIOBase):
total = gif.n_frames
@tylerchr
tylerchr / Dockerfile
Created July 21, 2018 01:37
Compiling V8 for alpine (link against musl)
#
# Building V8 for alpine is a real pain. We have to compile from source, because it has to be
# linked against musl, and we also have to recompile some of the build tools as the official
# build workflow tends to assume glibc by including vendored tools that link against it.
#
# The general strategy is this:
#
# 1. Build GN for alpine (this is a build dependency)
# 2. Use depot_tools to fetch the V8 source and dependencies (needs glibc)
# 3. Build V8 for alpine
@tb
tb / formikApollo.js
Created August 1, 2017 14:43 — forked from mwickett/formikApollo.js
Formik + Apollo
import React from 'react'
import { withRouter, Link } from 'react-router-dom'
import { graphql, compose } from 'react-apollo'
import { Formik } from 'formik'
import Yup from 'yup'
import FormWideError from '../elements/form/FormWideError'
import TextInput from '../elements/form/TextInput'
import Button from '../elements/form/Button'
import { H2 } from '../elements/text/Headings'
@NotSoSuper
NotSoSuper / help.lua
Last active October 25, 2023 16:04
NotSoBot Help Documentation
Complete command list of NotSoBot <439205512425504771>:
Owner: NotSoSuper <296044494812479498>
Prefix: .
* = Not Required
^ = Bot Owner Only
^^ = Server Admin Only
"/'s" in commands show aliases for the command (Ex: ".reverse/r <text>" Command can be run with .reverse or .r)
<max_messages> = The number of messages to search through
<image> = The image URL, @discord_user, the users name, discord/custom emoji, or, nothing inputted which will search through 25 messages for embeds or attachments
<image-face> = Image requires a HUMAN FACE to be included
@jarpy
jarpy / requirements.txt
Last active June 30, 2022 06:28
Serverless Elasticsearch Curator for AWS Lambda
certifi==2016.8.8
elasticsearch-curator==4.0.6
PyYAML==3.11
@Pustur
Pustur / daily-ui.md
Last active April 20, 2024 18:39
DailyUI – A list of every DailyUI design challenge

All DailyUI Challenges

  1. Sign Up
  2. Credit Card Checkout
  3. Landing Page (above the fold)
  4. Calculator
  5. App Icon
  6. User Profile
  7. Settings
  8. 404 page
@charity
charity / initialize.tf
Created May 19, 2016 18:31
top-level initialize.tf, symlinked into environments
## declare all the env-specific variables that are defined in *.tfvars
variable "env" { }
variable "name" { }
variable "size" { }
variable "cidr" { }
variable "instance_type" { }
variable "kafka_instance_type" { }
variable "retriever_instance_type" { }
@charity
charity / variables.tf
Created May 19, 2016 18:29
top level terraform variables.tf
### these variables should be the same across all environments
# your aws secret key and access key should be in your env variables
provider "aws" {
region = "us-east-1"
}
variable "tf_s3_bucket" { default = "hound-terraform-state" }
variable "master_state_file" { default = "base.tfstate" }
variable "prod_state_file" { default = "production.tfstate" } # TODO: make init.sh use these variables
variable "staging_state_file" { default = "staging.tfstate" }
@charity
charity / init.sh
Created May 18, 2016 20:19
terraform environment init.sh
#!/bin/bash
# Usage: ./init.sh once to initialize remote storage for this environment.
# Subsequent tf actions in this environment don't require re-initialization,
# unless you have completely cleared your .terraform cache.
#
# terraform plan -var-file=./production.tfvars
# terraform apply -var-file=./production.tfvars
tf_env="production"