I hereby claim:
- I am ejoubaud on github.
- I am ejoubaud (https://keybase.io/ejoubaud) on keybase.
- I have a public key ASC4V70jP4GYLh15POtHMHdB6bbITboG_AUDC-wjPf4IZAo
To claim this, I am signing this object:
| # bin/nats_worker | |
| require_relative "../config/environment" | |
| Rails.application.eager_load! | |
| def backoff_delay(attempt) | |
| # 1s, 2s, 4s… capped at 3 days, with 50–100% jitter | |
| [2**(attempt - 1), 3 * 24 * 3600].min * (0.5 + rand * 0.5) | |
| end | |
| nc = NATS.connect(ENV.fetch("NATS_URL")) |
| #!/bin/bash | |
| REPO=Go-Electra/electra-backend | |
| prs=$(gh pr list --state merged --repo $REPO --json createdAt,mergedAt --limit 100) | |
| count=0 | |
| total=0 | |
| lifetimes=() |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "hashicorp/bionic64" | |
| # Disable automatic box update checking. If you disable this, then | |
| # boxes will only be checked for updates when the user runs | |
| # `vagrant box outdated`. This is not recommended. | |
| # config.vm.box_check_update = false |
| func (api *AppointmentServiceV1Alpha1) ListAdvisers(ctx context.Context, req *v1alpha1.ListAdvisersRequest) (*v1alpha1.ListAdvisersResponse, error) { | |
| ctx = forwardGRPCMetadata(ctx) | |
| grpcClient, err := api.Schoolbackoffice.Service.KnownServiceGRPCClient("appointment") | |
| if err != nil { | |
| return nil, grpc.InternalError("missing appointment grpc client: %v", err) | |
| } | |
| appointmentClient := jobteaser_appointment_v1alpha1.NewAdviserServiceClient(grpcClient.Conn) | |
| listAdvisersResponse, err := appointmentClient.ListAdvisers(ctx, &jobteaser_appointment_v1alpha1.ListAdvisersRequest{ |
| require 'set' | |
| # A short buffer that can tell you if you've encountered a value recently | |
| # without taking up too much memory. | |
| # It keeps track of the n last items you've met | |
| class ShortMemo | |
| def initialize(max_size: 10, reset_when_met: false) | |
| @max_size = max_size | |
| @reset_when_met = reset_when_met |
| # requires slim gem installed for slimrb, and brew install tidy-html5 | |
| file_name=./app/views/errors/show.html.slim | |
| slimrb --erb "$file_name" \ | |
| | sed 's/::Temple::Utils\.escape_html((\(.*\))) %>/\1 %>/g' \ | |
| | tidy -q -i \ | |
| > ${file_name%.*}.erb |
| func QuickSort(a []int32) []int32 { | |
| if len(a) < 2 { | |
| return a | |
| } | |
| // lomuto partition | |
| lastIndex := len(a) - 1 | |
| pivot := a[lastIndex] | |
| j := -1 | |
| for i := range a[:lastIndex] { |
| select | |
| if(locate('PerformableMethod', s1) > 0, | |
| if(locate('method_name', s3) > 0, | |
| s3, | |
| s2 | |
| ), | |
| s1 | |
| ) s, | |
| sum(run_at <= now()) as total_waiting, -- date_add(now(), interval 8 hour)) | |
| min(priority), |
| ntpq -pn |
I hereby claim:
To claim this, I am signing this object: