Skip to content

Instantly share code, notes, and snippets.

View coffeejunk's full-sized avatar
:shipit:

Maximilian Haack coffeejunk

:shipit:
View GitHub Profile
# https://www.varnish-cache.org/docs/2.1/tutorial/vcl.html
# https://www.varnish-cache.org/trac/wiki/VCLExamples
# Summary
# 1. Varnish will poll the backend at /health_check to make sure it is
# healthy. If the backend goes down, varnish will server stale content
# from the cache for up to 1 hour.
# 2. Varnish will pass X-Forwarded-For headers through to the backend
# 3. Varnish will remove cookies from urls that match static content file
# extensions (jpg, gif, ...)

Keybase proof

I hereby claim:

  • I am coffeejunk on github.
  • I am coffeejunk (https://keybase.io/coffeejunk) on keybase.
  • I have a public key whose fingerprint is F1BF 633D 74EB 0105 7123 62A7 0E3F BF3C CDB1 B74D

To claim this, I am signing this object:

Provide this information to a travel agent to help them match the fares found.
Make sure to provide the exact booking and fare codes shown.
Fare 1: Carrier CM ENX50GFN SFO to PTY (rules)
Passenger type ADT, round trip fare, booking code W, E
Covers SFO-IAH (Economy), IAH-PTY (Economy)
$291.00
Fare 2: Carrier CM SERP30 SJO to UIO (rules)
Passenger type ADT, round trip fare, booking code S
Covers SJO-PTY (Economy), PTY-UIO (Economy)

Notes

This is the latest version of an email which I send periodically, offering customers the opportunity to pre-pay for SaaS in return for a discount. The benefits to the SaaS company are better cash flow and reduced churn rate. The benefits to the customer are, well, in the email. This genre of email has produced hundreds of thousands of dollars in pre-pays for some companies I work with, and it rarely requires any more work than this example.

I've put $79 is as a placeholder for the cost of the user's plan. We calculate that for each account, naturally, along with the billing contact's name.

Subject: Save $79 on Appointment Reminder (and get a tax write-off) Formatting: 100% plain text. Gmail automatically links up the central link. From: Patrick McKenzie (Appointment Reminder) [email protected]

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

// There are two ways to run this script
//
// 1. Replace all Smart Quotes in all Docs that are inside of a folder (and all subfolders)
// 2. Replace all Smart Quotes in one particular file
//
// Choose the which one you want to use and then change the value of the appropriate var, then select the method from the menu and press Run.
// Replace Smart Quotes with Dumb Quotes for every Document that is inside of the given folder
function findAndReplaceAll() {
[~/code/LT/cr_gen]$ swagger-codegen generate -i ../CredentialRegistry/public/swagger.json -l ruby -o rb
[main] INFO io.swagger.parser.Swagger20Parser - reading from ../CredentialRegistry/public/swagger.json
[main] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - No .swagger-codegen-ignore file found.
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/max/code/LT/cr_gen/rb/lib/swagger_client/models/api_info.rb
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/max/code/LT/cr_gen/rb/spec/models/api_info_spec.rb
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/max/code/LT/cr_gen/rb/docs/ApiInfo.md
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/max/code/LT/cr_gen/rb/lib/swagger_client/models/api_root.rb
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/max/code/LT/cr_gen/rb/spec/models/api_root_spec.rb
[main] INFO io.swagger.codegen.AbstractGenerator - writing file /Users/max/code/LT/cr_gen/rb/docs/Ap
{
"envelope_type": "resource_data",
"envelope_version": "1.0.0",
"envelope_community": "ce_registry",
"resource": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJAY29udGV4dCI6eyJzY2hlbWEiOiJodHRwOi8vc2NoZW1hLm9yZy8iLCJkYyI6Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIiwiZGN0IjoiaHR0cDovL2R1YmxpbmNvcmUub3JnL2RjL3Rlcm1zLyIsInJkZiI6Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiLCJyZGZzIjoiaHR0cDovL3d3dy53My5vcmcvMjAwMC8wMS9yZGYtc2NoZW1hIyIsImNldGVybXMiOiJodHRwOi8vcHVybC5vcmcvY3RkbC90ZXJtcy8ifSwiQHR5cGUiOiJjZXRlcm1zOkNlcnRpZmljYXRlIiwiQGlkIjoiaHR0cDovL2NyZWRlbnRpYWxlbmdpbmUub3JnL3Jlc291cmNlL3VybjpjdGlkOjY4MzQ1NGY3LWI4NzgtNDc5Zi1hOTZjLTZiODVkMDMzNDRkZiIsImNldGVybXM6YWNjcmVkaXRlZEJ5IjpbeyJAaWQiOiJodHRwOi8vY3JlZGVudGlhbGVuZ2luZS5vcmcvcmVzb3VyY2UvZWM0NDZmNjktMmM0Zi00ZWZiLTk1MTMtYzQ3OTRlMjU1M2E4In0seyJAaWQiOiJodHRwOi8vY3JlZGVudGlhbGVuZ2luZS5vcmcvcmVzb3VyY2UvNmJmYmU4NjUtYzgyMi00ZWIzLTg3OTItOWRmZDZkZmU4MjM5In1dLCJjZXRlcm1zOmFsdGVybmF0ZU5hbWUiOlsiRnVsbCBUZXN0IENyZWRlbnRpYWwgQWx0ZXJuYXRlIE5hbWUiXSwiY2V0ZXJt
require 'json-schema'
require 'json'
schema = JSON.parse(
<<JSONSCHEMA
{
"type": "object",
"required": [
"ceterms:foundingDate"
],
  1. Install swagger-codegen e.g. brew install swagger-codegen
  2. Retrieve the swagger.json file for CE/Registry
  3. Generate the code:
    swagger-codegen generate -i swagger.json -l ruby -o generated_ruby_code
    cd generated_ruby_code
    
  4. Install dependencies if necessary