Skip to content

Instantly share code, notes, and snippets.

View syntaqx's full-sized avatar
🤷
¯\_(ツ)_/¯

Chase Pierce syntaqx

🤷
¯\_(ツ)_/¯
View GitHub Profile
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@syntaqx
syntaqx / monosplit.yml
Created August 23, 2021 17:33
Monolithic Submodules
name: 'Submodules Sync'
on:
# Allows you to run this workflow manually from the Actions tab or through HTTP API
workflow_dispatch:
jobs:
sync:
name: 'Submodules Sync'
runs-on: ubuntu-latest
@syntaqx
syntaqx / unzip-googledrive.sh
Created April 20, 2021 02:23
Download and unzip directly from Google Drive
#!/usr/bin/env bash
set -e
# The file must be publically accessible:
# - Go to "Share" in the "More actions" dropdown
# - In the "Get Link" section, select "Change to anyone with this link"
# - You should see a link above the text:
# > Anyone with the link
# > Anyone on the internet with this link can view
# - Copy the url to your clipboard and set the value of $fileurl
@syntaqx
syntaqx / Dockerfile
Created March 31, 2021 13:54
Dockerfrosting starter kit
FROM scratch AS tin
RUN pour in the ingredients
FROM box AS premade
LABEL read=instructions
FROM oven
COPY --from=tin /tin/ /bottomshelf
COPY --from=box /box /bottomself/tin/
@syntaqx
syntaqx / enum.go
Created September 29, 2020 01:36 — forked from lummie/enum.go
Golang Enum pattern that can be serialized to json
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int
#showtooltip
/cast [noworn:Fishing Pole] !Attack
/stopmacro [noworn:Fishing Pole]
/console Sound_EnableAllSound 0
/use !item:6533
/use 16
/use Fishing
/console Sound_EnableAllSound 1
@syntaqx
syntaqx / docker-compose.override.yml
Last active February 1, 2020 10:32
A simple example exposing docker services over localhost port bindings
version: '3.7'
services:
traefik:
ports:
- "80:80"
- "443:443"
- "8080:8080"
#!/bin/bash
set -e
# This script fetches swarm join tokens from a remote server, via SSH
# https://www.terraform.io/docs/providers/external/data_source.html#processing-json-in-shell-scripts
# Parse existing /dev/stdin as JSON and into shell variables.
[ ! -t 0 ] && eval "$(jq -r '@sh "SSH_HOST=\(.host) SSH_USER=\(.user) IDENTITY_FILE=\(.identity)"')"
SSH_HOST=${SSH_HOST:-""}
@syntaqx
syntaqx / cluster-aws.yml
Created August 7, 2019 23:47
Docker Cluster :: docker cluster create --file cluster.yml --name quickstart
variable:
domain: "YOUR DOMAIN, e.g. docker.com"
subdomain: "A SUBDOMAIN, e.g. cluster"
region: "THE AWS REGION TO DEPLOY, e.g. us-east-1"
email: "[email protected]"
ucp_password:
type: prompt
provider:
acme:
@syntaqx
syntaqx / main.tf
Last active August 7, 2019 13:44
[checkpoint] Just saving where I'm at because I'm resetting this bit
terraform {
required_version = ">= 0.12"
}
#
# @HOWTO: reference another state files output
#
# data "terraform_remote_state" "current" {
# backend = "remote"
#