Skip to content

Instantly share code, notes, and snippets.

View paulodiniz's full-sized avatar
🐕

Paulo Diniz paulodiniz

🐕
View GitHub Profile
# Reverse Proxy
This document provides the basis for build the Airy Reverse Proxy.
## Vision
We want to give our core users the ability spawn a basic version of the Airy plataform with one (or a few amount) of simple commands. One aspect of this is that we need to provide a way of a source (Facebook) to be able to send messages to the local ran platform. This should be invisible to the user, with none or only a few basic configuration steps before running it.
To achieve this, we need to build a reverse proxy that sits between the source and the local cluster. The reverse proxy will receive events from the source and forward it to the local cluster on a specific endpoint and port.
## Requirements
d
package main
import(
"fmt"
"flag"
"os"
"log"
"path/filepath"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/kubernetes"

Keybase proof

I hereby claim:

  • I am paulodiniz on github.
  • I am paulodiniz (https://keybase.io/paulodiniz) on keybase.
  • I have a public key ASAPM9sW68LsaKfaPl04V9jKsmhp4lOdDhQHkATmQQojYQo

To claim this, I am signing this object:

class AddTypeToBoleto < ActiveRecord::Migration[5.1]
class Boleto < ApplicationRecord; end
def change
add_column :boletos, :type, :string
Boleto.find_each do |boleto|
boleto.type = 'boleto_bancario'
boleto.save!
end
(spacemacs|create-align-repeat-x "brackets" "\\(\\s-*\\){" nil t)
(spacemacs/set-leader-keys "xa{" 'spacemacs/align-repeat-brackets)
```lisp
(spacemacs|create-align-repeat-x "brackets" "\\(\\s-*\\){" nil t)
(spacemacs/set-leader-keys "xa{" 'spacemacs/align-repeat-brackets)
```
func qsort(a []int) []int {
if len(a) < 2 { return a }
left, right := 0, len(a) - 1
// Pick a pivot
pivotIndex := rand.Int() % len(a)
// Move the pivot to the right
a[pivotIndex], a[right] = a[right], a[pivotIndex]
15:56:52.294 [error] GenServer #PID<0.1242.0> terminating
** (FunctionClauseError) no function clause matching in :http_transport.close/2
(inets) http_transport.erl:346: :http_transport.close(:undefined, #Port<0.10039>)
(stdlib) gen_server.erl:643: :gen_server.try_terminate/3
(stdlib) gen_server.erl:809: :gen_server.terminate/7
(stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: {:init_error, :error_sending, {#Reference<0.0.4.973>, {:error, :closed}}}
import collections
print 'Regular dictionary:'
d = {}
d['a'] = 'A'
d['b'] = 'B'
d['c'] = 'C'
d['d'] = 'D'
d['e'] = 'E'