Skip to content

Instantly share code, notes, and snippets.

View dangolbeeker's full-sized avatar
🛰️
In Orbit

Scott Beeker dangolbeeker

🛰️
In Orbit
View GitHub Profile
@panoply
panoply / auth.js
Last active April 12, 2023 15:04
Lambda Shopify OAUTH
import { config } from 'dotenv'
import Shopify from 'shopify-api-node'
import cryptographer from '@brixtol/cryptographer'
config()
export const crypto = cryptographer(process.env.SHOPIFY_AUTH_SECRET)
/**
* Request Headers
@abbaspour
abbaspour / nginx.conf
Last active February 4, 2024 19:20
Guide how to enable JWT validation on open source nginx server using ngx-http-auth-jwt-module
daemon off;
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
@jamesmishra
jamesmishra / README.md
Last active March 25, 2024 20:02
Using Terraform to run a docker-compose.yml file directly on an Amazon EC2

Introduction

This is a Hashicorp Terraform module that provisions an AWS EC2 instance for the purpose of running a given docker-compose.yml file.

Usage

# ===== OUR MAGIC DOCKER-COMPOSE.YML FILE HERE =====
# It is also possible to get Terraform to read an external `docker-compose.yml`
# file and load it into this variable.
# We'll be showing off a demo nginx page.

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@azu
azu / amp.d.ts
Last active November 19, 2022 06:08
TypeScript definitions for AMP Attributes. Write AMP in JSX.
// roughish AMP attribute types for JSX/TypeScript
// Source: https://playground.amp.dev/amphtml-hint.json
// https://github.com/Microsoft/TypeScript/issues/15449
// https://stackoverflow.com/questions/50585952/typescript-and-google-amp-property-amp-img-does-not-exist-on-type-jsx-intrin
import * as React from 'react';
// why null ?
type _ANY = any;
type _ANYS = any;
declare module 'react' {
interface HTMLAttributes<T> {

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active May 26, 2024 10:33
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

Vertical decomposition. Creating cohesive services

One of the biggest misconceptions about services is that a service is an independent deployable unit, i.e., service equals process. With this view, we are defining services according to how components are physically deployed. In our example, since it’s clear that the backend admin runs in its own process/container, we consider it to be a service.

But this definition of a service is wrong. Rather you need to define your services in terms of business capabilities. The deployment aspect of the system doesn’t have to be correlated to how the system has been divided into logical services. For example, a single service might run in different components/processes, and a single component might contain parts of multiple services. Once you start thinking of services in terms of business capabilities rather than deployment units, a whole world of options open.

What are the Admin UI

@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@shalotelli
shalotelli / index.html
Created May 24, 2017 01:16
Creating Web Components in JavaScript (ES6) to use in your Angular, React and Ember projects
<!DOCTYPE html>
<html>
<head>
<title>Web Components</title>
<style>
body {
font-family: 'Helvetica Neue';
}
</style>