Skip to content

Instantly share code, notes, and snippets.

View clemlesne's full-sized avatar

Clémence Lesné clemlesne

View GitHub Profile
clemlesne / gist:804e26c1ff06184dc04328b39b20cc87
Created December 19, 2017 15:00
Change root password with MariaDB
To begin, stop the database service and check the service status:
------------- SystemD -------------
# systemctl stop mariadb
------------- SysVinit -------------
# /etc/init.d/mysqld stop
Next, start the service with --skip-grant-tables:
------------- SystemD -------------
clemlesne /
Last active March 19, 2019 15:25
Proper permissions for web server's directory

First, fix the owners :

sudo chgrp -R www-data .

Then, fix the access permissions :

For read-only folders :

sudo find . -type f -exec chmod 0460 {} \;
clemlesne / pod-dummy.yaml
Created May 20, 2021 08:43
Dommy Kubernetes pod
apiVersion: v1
kind: Pod
name: dummy
env: test
- name: dummy
image: busybox
clemlesne /
Last active August 2, 2021 10:35
Wipe AWS Timestream database plus tables
# Wipe all tables contained into a AWS Timestream database.
# Usage: -d [my-db]
# TODO: Iterate through the AWS pagination for getting more than 20 tables per script exec
usage() {
clemlesne /
Last active December 21, 2022 15:28
Import Google Keep notes to Notion
import csv
import gkeepapi
import keyring
import os
import re
import urllib.request
import uuid
from datetime import datetime
from notion.block import PageBlock, TextBlock, TodoBlock, BulletedListBlock, NumberedListBlock, ImageBlock

Keybase proof

I hereby claim:

  • I am clemlesne on github.
  • I am clemlesne ( on keybase.
  • I have a public key ASBlF7TJcpKNuCwtGSzT_bXPdby5s6-pseUdgxO1N-XS5go

To claim this, I am signing this object:

set -e
if [[ $SYS_ARCH == x86_64 ]]; then
clemlesne / openai.svg
Created August 31, 2023 08:49
OpenAI SVG icon
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
clemlesne /
Created September 18, 2023 17:05
Takes a raw string of HTML and removes all HTML tags, Markdown tables, and line returns.
from typing import Optional
import re
import html
def sanitize(raw: Optional[str]) -> Optional[str]:
Takes a raw string of HTML and removes all HTML tags, Markdown tables, and line returns.
if not raw:
title: Deployment workflow
flowchart LR

    subgraph azdo["Azure DevOps"]
        repo["Azure Repos"]
        pipeline["Azure Pipelines"]