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/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:
| defmodule MyApp.AuthController do | |
| use MyApp.Web, :controller | |
| # 1. I need that \\ default arg here. I guess I can live with this. Explicit deps, pure functions, why not. | |
| def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params, auth_service \\ MyApp.Auth) do | |
| case auth_service.sign_up_or_sign_in(auth) do | |
| {:ok, user} -> | |
| conn | |
| # 0. More of a problem with controller unit tests than with mocks, but still related as it's about isolation unit tests: | |
| # `#put_session` won't work here in my unit test |