Skip to content

Instantly share code, notes, and snippets.

@jsaneu
jsaneu / root-password-MariaDB-docker-compose.md
Created July 15, 2022 08:09 — forked from rordi/root-password-MariaDB-docker-compose.md
Change root password in MariaDB Docker container running with docker-compose

Change root password in MariaDB Docker container running with docker-compose

Override the entrypoint in docker-compose.yml for the MariaDB Docker container by adding:

entrypoint: mysqld_safe --skip-grant-tables --user=mysql

The start up the Docker Compose stack:

$> docker-compose up -d
@jsaneu
jsaneu / wiki-crawler.md
Last active March 22, 2021 12:44
MediaWiki Crawler

Gets the website

wget -nH --reject-regex 'Especial|Special|Ayuda|Help|action|printable|Archivo:' --recursive --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains domain.com --no-parent http://domain.com/wiki

Remove external links regexp

Find: (<a[^>]*href="http)[^"]*("[^>]*>)([^"]*)(</a>)

Replace: $3

source

icon.svg

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="200" xml:space="preserve">
    <style type="text/css">.fill {fill : #4E79B2; stroke:#4E79B2;}.fillo{fill : #83A1C9; stroke:#83A1C9;}</style>
    <defs>
        <g id="net">
            <polygon points="82,30 82,0 52,0 52,12 44,12 44,0 38,0 38,47 30,47 30,35 0,35 0,65 30,65 30,53 38,53 38,100 44,100 44,88 52,88 52,100 82,100 82,70 52,70 52,82 44,82 44,18 52,18 52,30 "/>
@jsaneu
jsaneu / Configuring P6Spy.md
Last active April 15, 2021 02:34
Configuring P6Spy

[p6spy][1]

P6Spy is a framework that enables database data to be seamlessly intercepted and logged with no code changes to existing application. The P6Spy distribution includes P6Log, an application which logs all JDBC transactions for any Java application.

pom.xml maven dependency

<dependency>
    <groupId>p6spy</groupId>
    <artifactId>p6spy</artifactId>
    <version>2.0.2</version>
</dependency>
@jsaneu
jsaneu / How to Configure Maven to work with NTLM proxies.md
Created May 15, 2014 14:57
How to Configure Maven to work with NTLM proxies

How to Configure Maven to work with NTLM proxies

Add wagon-http-lightweight extension

Wagon HTTP lightweight library allows us to overcome authentication limitations in Maven (3.0.4) when working with NTLM proxies. We can follow the steps below to add the Wagon HTTP lightweight library as a Maven extension:

  • Download [wagon-http-lightweight-2.2.jar][1]
  • Copy the wagon-http-lightweight-2.2.jar to %M2_HOME%/lib/ext folder.