Skip to content

Instantly share code, notes, and snippets.

View dbrrt's full-sized avatar
🚲

David Barrat dbrrt

🚲
View GitHub Profile
@dbrrt
dbrrt / handler.js
Created September 23, 2021 15:02 — forked from adieuadieu/handler.js
AWS Elasticsearch Cluster with Serverless Framework
const aws4 = require('aws4')
const fetch = require('node-fetch')
const host = process.env.ELASTICSEARCH_ENDPOINT
module.exports.default = async function handler(event, context) {
const indexName = 'example'
const options = aws4.sign({
host,
import React, { useEffect, useState } from "react";
import { makeStyles } from "@material-ui/core/styles";
import Table from "@material-ui/core/Table";
import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell";
import TableContainer from "@material-ui/core/TableContainer";
import TableHead from "@material-ui/core/TableHead";
import TableRow from "@material-ui/core/TableRow";
import Paper from "@material-ui/core/Paper";
@dbrrt
dbrrt / clean-instance-ocp.sh
Created November 6, 2020 09:43
will clean everything related a to an OCP instance knowing the service name
SERVICE_NAME=$1
PROJECT=myproject
oc delete bc $SERVICE_NAME -n $PROJECT
oc delete dc $SERVICE_NAME -n $PROJECT
oc delete svc $SERVICE_NAME -n $PROJECT
oc delete route $SERVICE_NAME -n $PROJECT
from fs.sshfs import SSHFS
host = '192.168.1.10'
remote_path = '/home/jovyan/dev/test-fs-sshfs/requirements.txt'
remote_fs = SSHFS(
host, user='david', passwd='test', pkey=None, timeout=10, port=22,
keepalive=10, compress=False, config_path='~/.ssh/config'
)