Skip to content

Instantly share code, notes, and snippets.

@ldoguin
ldoguin / Yay.txt
Created March 16, 2024 10:27
My favorite places in Paris
KubeCon people, welcome to Paris. I am a bit of a foodie, so I am happy to share my list with you. Queer friendlier places on demande because there are not as many. Let's go!
Le Cadoret - French bistro, always a vegetarian option, one of the best wine lists in Paris. They sometimes have cantillon on tap, the food is exceptional for the price - https://maps.app.goo.gl/MaF6hwn4Y8crNx2h8
Le Pinceau - not super vege friendly, but, as small as astonishing, one of my favorite places, just ask for carte blanche and let the chef guide you. Very, Very french https://maps.app.goo.gl/2znfspxvtvUP3T5c8
Le comptoir - another fantastic Italian restaurant, woman owned, she is a fantastic chef, always has vegetarian options on the menu. I had scallops carpaccio and sea urchin pasta the last time - https://maps.app.goo.gl/xrNHmNiyGnT3zvrS7
Tempilenti - another fantastic, woman owned, Italian restaurant. I am a big fan of their vitello tonnato, pasta Will be Al Dente as F*ck - https://maps.app.goo.gl/Pdj5jArfQtpiJsSTA
@ldoguin
ldoguin / LearnReactorRetryStrategiesApplicationTests.java
Created August 24, 2023 09:28
Spring Boot Junit Test to try Reactor Retries Strategies
package com.couchbase.learnreactorretrystrategies;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.TestConfiguration;
const { ApolloServer, gql } = require('apollo-server');
var couchbase = require('couchbase')
// A schema is a collection of type definitions (hence "typeDefs")
// that together define the "shape" of queries that are executed against
// your data.
const typeDefs = gql`
# Comments in GraphQL strings (such as this one) start with the hash (#) symbol.
type Airline {
wget -O nix-user-chroot https://github.com/nix-community/nix-user-chroot/releases/download/1.0.3/nix-user-chroot-bin-1.0.3-x86_64-unknown-linux-musl
chmod +x nix-user-chroot
mkdir -m 0755 ~/.nix
./nix-user-chroot ~/.nix bash -c "curl -L https://nixos.org/nix/install | bash"
./nix-user-chroot ~/.nix bash
. /home/bas/.nix-profile/etc/profile.d/nix.sh
nix --version
@ldoguin
ldoguin / 2pgReadme.md
Last active December 30, 2020 12:02
How to manage two postgresql instance for a single application

How to manage two postgresql instance for a single application

If you have an application that requires two PostgreSQL databases, both managed by Clever Cloud, you might have an issue. The naive way to do this would be to link the two PGs addons. But then you would have an issue because the provided environment variables have the same name, so you would only have access to one PG.

Here's a quick and dirty way to manage an additional database automatically.

For the application that needs two databases:

Configuration

@ldoguin
ldoguin / readme.md
Last active July 22, 2020 12:42
Deploy request bin
git clone https://github.com/lornajane/requestbin

cd requestbin

clever create --type python requestbin

clever addon create redis-addon --plan s redis-requestbin

clever service link-addon redis-requestbin
@ldoguin
ldoguin / Public static site on clever cloud
Last active June 11, 2020 16:12
Clever gist for static site deployer
Create a cellar addon, create a bucket named after your domain name.
Create a static app and link it to cellar.
Add the right environment variable, easiest wqy to get CLever secret and token is to cat ~/.config/clever-cloud
@ldoguin
ldoguin / gist:c0b27baca1ad7c63fb4399d7b2dfb480
Created May 18, 2020 08:23
Deno variable for nodejs app
CC_PRE_BUILD_HOOK="(curl -fsSL https://deno.land/x/install/install.sh | sh) && ${DENO_INSTALL}/bin/deno install --root \"${DENO_INSTALL}\" --allow-env --allow-net http.ts && mv ~/.cache/deno ./.deno-cache"
CC_PRE_RUN_HOOK="mv ./.deno-cache ~/.cache/deno"
CC_RUN_COMMAND="PATH=${DENO_INSTALL}/bin:$PATH ${DENO_INSTALL}/bin/http"
DENO_INSTALL="/home/bas/app_952e28a8-41e0-4606-9536-0d2d0891f46f/.deno"
PORT="8080"
@ldoguin
ldoguin / mqttclever.groovy
Created March 27, 2020 23:01
run a vertx http server on 8080 and an mqtt server
@GrabResolver(name='staging', root ='https://oss.sonatype.org/content/repositories/iovertx-3863/')
@Grab(group='io.vertx', module='vertx-core', version='3.8.5')
@Grab(group='io.vertx', module='vertx-mqtt', version='3.8.5')
@Grab(group='io.vertx', module='vertx-web', version='3.8.5')
@Grab(group='io.vertx', module='vertx-lang-groovy', version='3.8.5')
import io.vertx.mqtt.MqttServer
import io.vertx.mqtt.MqttServerOptions
import io.vertx.core.AbstractVerticle;
import io.vertx.core.DeploymentOptions;
import io.vertx.core.Vertx;
#!/bin/bash -l
cat <<EOF >apm-server.yml
apm-server:
host: "0.0.0.0:8080"
secret_token: "${ES_ADDON_APM_AUTH_TOKEN}"
output.elasticsearch:
hosts: ["${ES_ADDON_HOST}:443"]
protocol: "https"