View encryption-middleware.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { InngestMiddleware } from "inngest"; | |
export const encryptionMiddleware = ( | |
key: string = process.env.INNGEST_ENCRYPTION_KEY || "" | |
) => { | |
if (!key) { | |
throw new Error("Must provide an encryption key"); | |
} | |
const prefix = "__ENCRYPTED__"; |
View index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createFunction } from "inngest"; // v0.6.1 | |
import { serve } from "inngest/cloudflare"; | |
/** | |
* Inngest serve requires "node_compat = true" to be set in your wrangler.toml | |
* | |
* Set INNGEST_SIGNING_KEY in your wrangler.toml environment variables. | |
* Get this key in your Inngest dashboard: https://app.inngest.com/secrets | |
*/ |
View local-deploy.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage `./local-deploy.sh <command> <service-name> | |
# Requirements: helm must be installed and match the version on our cluster | |
# commands: | |
# deploy Deploys the code to the cluster (requires cluster access) | |
# dry-run Prints the k8s deployment and service yaml files generates by helm | |
CMD="$1" | |
SVC="$2" |
View folders.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 3 package approach | |
/maildev-smtp | |
/src # most of what currently is in /lib | |
/test | |
/index.js | |
/package.json | |
/maildev-ui | |
/src # all the react components, etc. | |
/public | |
/package.json |
View 1-regular-probes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: respond-server | |
namespace: reply | |
spec: | |
replicas: 12 | |
strategy: | |
rollingUpdate: | |
maxSurge: 2 |
View MongoIdShim.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MongoId implements Serializable, JsonSerializable | |
{ | |
public $id; | |
public function __construct($id) | |
{ | |
$this->id = (string) $id; | |
} |
View index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const logger = (t) => (document.body.innerHTML = `${document.body.innerHTML}<br>${JSON.stringify(t)}`) | |
/// app | |
const { createStore, combineReducers } = require('redux') | |
const OPEN_COMPOSER = 'OPEN_COMPOSER' | |
const CLOSE_COMPOSER = 'CLOSE_COMPOSER' | |
// The metrics reducer - we just grab the even and let the state pass through | |
const bufferMetrics = (state = {}, action) => { |
View .hyperterm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 16, | |
// font family with optional fallbacks | |
fontFamily: '"Droid Sans Mono For Powerline", "Roboto Mono", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
// terminal cursor background color (hex) | |
// cursorColor: '#F81CE5', |
View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.3 | |
ADD logger.sh /logger.sh | |
RUN chmod +x /logger.sh | |
CMD /bin/sh -c "/logger.sh" |
View next.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// What is ES2015? | |
// !!!!!!!!!!!!!! let, const !!!!!!!!!!!!!!!!!!!!!! | |
const ONE_HOUR = 60 * 60 * 1000; | |
ONE_HOUR = 60 * 60; | |
// Throws error |
NewerOlder