<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: zankyr</title>
    <description>The latest articles on DEV Community by zankyr (@zankyr).</description>
    <link>https://dev.to/zankyr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F464865%2F58b783fb-1a45-4dff-ad6b-056df073f6c3.png</url>
      <title>DEV Community: zankyr</title>
      <link>https://dev.to/zankyr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zankyr"/>
    <language>en</language>
    <item>
      <title>Git &amp; tricks: plugins + tools</title>
      <dc:creator>zankyr</dc:creator>
      <pubDate>Wed, 08 Feb 2023 14:16:13 +0000</pubDate>
      <link>https://dev.to/zankyr/git-tricks-plugins-tools-50gg</link>
      <guid>https://dev.to/zankyr/git-tricks-plugins-tools-50gg</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// TODO place a beautiful and smart introduction here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;ul&gt;
&lt;li&gt;
IntelliJ

&lt;ul&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;.ignore&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
Lazygit
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  IntelliJ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Git
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3EFiEfgq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/os2nitxqpnm0mvcak27n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3EFiEfgq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/os2nitxqpnm0mvcak27n.png" alt="Git plugin image" width="674" height="138"&gt;&lt;/a&gt;&lt;br&gt;
If I had to choose only one plugin to use, my choice would fall on this. It comes bundled with intellij,&lt;br&gt;
even in the Community Edition, and I haven’t found a Git client yet that’s so simple and effective to use.&lt;br&gt;
It’s free, but I’d also be willing to pay just for the merge/rebase conflict manager feature.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://plugins.jetbrains.com/plugin/7495--ignore"&gt;.ignore&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VW7xsDIE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tk7i4dhu6t6m8iee0d6p.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VW7xsDIE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tk7i4dhu6t6m8iee0d6p.gif" alt="Image from the official page" width="716" height="411"&gt;&lt;/a&gt;&lt;br&gt;
Create ignore files for most of the tools/platforms (git, yarn, Docker, etc.) in an easy way. &lt;br&gt;
Main features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;lots of templates for specific languages (Java, Node, etc.) or tools (JetBrains, Visual Studio Code, etc.)&lt;/li&gt;
&lt;li&gt;syntax highlight&lt;/li&gt;
&lt;li&gt;custom templates&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lazygit
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MHVjlras--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e0civls8ma5jrr7aiuew.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MHVjlras--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e0civls8ma5jrr7aiuew.gif" alt="Image from the original page" width="880" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you don't want to learn git's commands (let's be honest, solving a merge conflict via command line is not so fun), and you have to work on different projects using different IDEs, maybe you'd like Lazygit. This is a Git UI for your terminal, so you don't have to work with different Git plugins each time you switch from IntelliJ to VS Code and viceversa.&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>Git &amp; tricks: commands</title>
      <dc:creator>zankyr</dc:creator>
      <pubDate>Thu, 17 Nov 2022 13:48:34 +0000</pubDate>
      <link>https://dev.to/zankyr/my-own-personal-git-cheat-sheet-5hif</link>
      <guid>https://dev.to/zankyr/my-own-personal-git-cheat-sheet-5hif</guid>
      <description>&lt;p&gt;This is my collection of unconventional git commands. Here you won’t find basic commands like &lt;code&gt;git log&lt;/code&gt; or &lt;code&gt;git checkout&lt;/code&gt;, but more particular instructions that have come in handy during my daily work.&lt;/p&gt;



&lt;ul&gt;
&lt;li&gt;Empty commit&lt;/li&gt;
&lt;li&gt;Restore file from another branch&lt;/li&gt;
&lt;li&gt;Delete branches by filters. &lt;/li&gt;
&lt;li&gt;
Delete all local branches not matching the provided name(s)
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Empty commit
&lt;/h2&gt;

&lt;p&gt;If you want to make a commit even if you didn't modify any file, for example&lt;br&gt;
to create a bookmark or checkpoint, just pass the &lt;code&gt;--allow-empty&lt;/code&gt; option:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git commit &lt;span class="nt"&gt;--allow-empty&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s1"&gt;'Started working on PR'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Restore file from another branch
&lt;/h2&gt;

&lt;p&gt;To restore a file using the version from another branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git restore &lt;span class="nt"&gt;--source&lt;/span&gt; develop &lt;span class="nt"&gt;--&lt;/span&gt; /path/to/file/to/restore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--source develop&lt;/code&gt; is the source branch. This version will override the file in your current branch;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/path/to/file/to/restore&lt;/code&gt; is the path (absolute or relative) of the file to restore.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Delete branches by filters.
&lt;/h2&gt;

&lt;p&gt;In the example, all the branches starting with "&lt;code&gt;fix&lt;/code&gt;" will be removed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git branch &lt;span class="nt"&gt;-D&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;git branch &lt;span class="nt"&gt;--list&lt;/span&gt; &lt;span class="s1"&gt;'fix-*'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Delete all local branches not matching the provided name(s)
&lt;/h2&gt;

&lt;p&gt;In this example, all the branches different from &lt;code&gt;master&lt;/code&gt;, &lt;code&gt;main&lt;/code&gt; or &lt;code&gt;develop&lt;/code&gt; will be deleted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="nt"&gt;-each-ref&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt; &lt;span class="s1"&gt;'%(refname:short)'&lt;/span&gt; refs/heads &lt;span class="se"&gt;\&lt;/span&gt;
| &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s2"&gt;"master&lt;/span&gt;&lt;span class="se"&gt;\|&lt;/span&gt;&lt;span class="s2"&gt;main&lt;/span&gt;&lt;span class="se"&gt;\|&lt;/span&gt;&lt;span class="s2"&gt;develop"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
| xargs git branch &lt;span class="nt"&gt;-D&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>git</category>
    </item>
    <item>
      <title>Create an Oracle database Docker image</title>
      <dc:creator>zankyr</dc:creator>
      <pubDate>Mon, 23 Aug 2021 19:54:30 +0000</pubDate>
      <link>https://dev.to/zankyr/create-an-oracle-database-docker-image-1e2n</link>
      <guid>https://dev.to/zankyr/create-an-oracle-database-docker-image-1e2n</guid>
      <description>&lt;p&gt;In this article, I will show how to run Oracle Database Express Edition using Docker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;git&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.docker.com/" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.oracle.com/technical-resources/" rel="noopener noreferrer"&gt;Oracle binaries&lt;/a&gt; (optional)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a post dedicated to Oracle?
&lt;/h2&gt;

&lt;p&gt;On DockerHub you can find images for most of the common databases such as PostgreSQL or MariaDB. But when it comes to Oracle, all the good things come to an end. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu60sjj757rw0b7fo6m5k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu60sjj757rw0b7fo6m5k.jpg" alt="dinkleberg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Due to (I think) copyright reasons, Oracle doesn't provide images that can be pulled and run on a Docker instance.&lt;/p&gt;

&lt;p&gt;But strangly, they provided an alternative solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Oracle Database in Docker
&lt;/h2&gt;

&lt;p&gt;Oracle made available a suite of Docker build scripts that help set up many of its product offerings, including Oracle Database. You can find these scripts in a &lt;a href="https://github.com/oracle/docker-images" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs4bk7akz7wd9k898flrl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs4bk7akz7wd9k898flrl.jpg" alt="i'll create my own docker image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll deploy the version &lt;strong&gt;18.4.0-xe&lt;/strong&gt; because it is the only version that doesn't requires pre-downloaded binaries. For any other version, you'll need to download the required binaries as described below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; All the step marked as (Optional) can be skipped for the version &lt;strong&gt;18.4.0-xe&lt;/strong&gt;, but are required for any other version.&lt;/p&gt;

&lt;h3&gt;
  
  
  (Optional) Download Oracle binaries
&lt;/h3&gt;

&lt;p&gt;Go to &lt;a href="https://www.oracle.com/technical-resources/" rel="noopener noreferrer"&gt;Oracle Download page&lt;/a&gt;. and download the db version you require, for example &lt;code&gt;oracle-database-xe-18c-1.0-1.x86_64.rpm&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Clone Oracle Github project
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ git clone https://github.com/oracle/docker-images.git


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  (Optional) Copy the database binaries into the project folder
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ cp /path/to/file/oracle-database-xe-18c-1.0-1.x86_64.rpm /path/to/project/docker-images/OracleDatabase/SingleInstance/dockerfiles/18.4.0


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Execute the installer. For the options description, see the command helper
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ cd docker-images/OracleDatabase/SingleInstance/dockerfiles
$ ./buildContainerImage.sh -v 18.4.0 -x


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;WARNING: the script can take up to 30 minutes before finishing&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the image
&lt;/h3&gt;

&lt;p&gt;List the docker images:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ docker images


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and check that there's an image tagged as &lt;code&gt;oracle/database                      18.4.0-xe&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Pay attention to the size of the image: sometimes the installation does not complete completely but the script ends without reporting any problems. The image should be approximately 5.89GB in size&lt;/p&gt;

&lt;h3&gt;
  
  
  Run the container
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ docker run --name oracle \
    -d \
    -p 51521:1521 \
    -p 55500:5500 \
    -e ORACLE_PWD=mysecurepassword \
    -e ORACLE_CHARACTERSET=AL32UTF8 \
    oracle/database:18.4.0-xe


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Where &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--name&lt;/code&gt;: specifies the container name&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-d&lt;/code&gt;: launch the container in detached mode&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-p 51521:1521&lt;/code&gt; and &lt;code&gt;-p 55500:5500&lt;/code&gt; map a host to a container port.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-e ORACLE_PWD=mysecurepassword&lt;/code&gt; and &lt;code&gt;-e ORACLE_CHARACTERSET=AL32UTF8&lt;/code&gt; set the environment variables. Here, &lt;code&gt;ORACLE_PWD&lt;/code&gt; sets the administrative password, and &lt;code&gt;ORACLE_CHARACTERSET&lt;/code&gt; sets the database’s character set.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can check the container status via the &lt;code&gt;docker run&lt;/code&gt; command, looking the &lt;code&gt;STATUS&lt;/code&gt; field:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ d ps
CONTAINER ID   IMAGE                       COMMAND                  CREATED              STATUS                                 PORTS                                                                                      NAMES
f7776a6dd664   oracle/database:18.4.0-xe   "/bin/sh -c 'exec $O…"   About a minute ago   Up About a minute (health: starting)   0.0.0.0:51521-&amp;gt;1521/tcp, :::51521-&amp;gt;1521/tcp, 0.0.0.0:55500-&amp;gt;5500/tcp, :::55500-&amp;gt;5500/tcp   oracle


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the example, the container is still starting (&lt;code&gt;health: starting&lt;/code&gt;). Once the container is started, the status will change in &lt;code&gt;healty&lt;/code&gt;.&lt;br&gt;
Another way to check the container status is looking the container logs:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ docker logs oracle
## Omitted for brevity
*******************
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
31% complete
34% complete
38% complete
41% complete
43% complete
Completing Database Creation
47% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/XE.
Database Information:
Global Database Name:XE
System Identifier(SID):XE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.

Connect to Oracle Database using one of the connect strings:
     Pluggable database: 2540b6bf28f7/XEPDB1
     Multitenant container database: 2540b6bf28f7
Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE
The Oracle base remains unchanged with value /opt/oracle
#########################
DATABASE IS READY TO USE!
#########################



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Since every time you launch the container the database instance needs to be installed, the container takes several minutes before it is ready.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connecting to the database
&lt;/h3&gt;

&lt;p&gt;You can connect the database using any client you want. In the example I've used &lt;a href="https://dbeaver.io/" rel="noopener noreferrer"&gt;dbeaver&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Folubqibsihg1ufbravq8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Folubqibsihg1ufbravq8.png" alt="Connect to the db"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, create a bash session within the container, using the OS user &lt;code&gt;oracle&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ docker exec -it --user=oracle oracle bash


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Set up the required Linux environment variables for Oracle Database:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

bash-4.2# . oraenv
ORACLE_SID = [XE] ? 
The Oracle base remains unchanged with value /opt/oracle


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then access SQL*Plus as you would on any Oracle Database system:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&lt;p&gt;bash-4.2# sqlplus sys@XEPDB1 as sysdba&lt;/p&gt;

&lt;p&gt;SQL*Plus: Release 18.0.0.0.0 - Production on Mon Aug 23 19:49:33 2021&lt;br&gt;
Version 18.4.0.0.0&lt;/p&gt;

&lt;p&gt;Copyright (c) 1982, 2018, Oracle.  All rights reserved.&lt;/p&gt;

&lt;p&gt;Enter password: &lt;/p&gt;

&lt;p&gt;Connected to:&lt;br&gt;
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production&lt;br&gt;
Version 18.4.0.0.0&lt;/p&gt;

&lt;p&gt;SQL&amp;gt; &lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Coming next&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Currently the database is working, but running the container requires a lot of time. In next posts I'll show how to improve starting time using different methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/oracle/docker-images" rel="noopener noreferrer"&gt;https://github.com/oracle/docker-images&lt;/a&gt;&lt;br&gt;
&lt;a href="https://blogs.oracle.com/oraclemagazine/deliver-oracle-database-18c-express-edition-in-containers" rel="noopener noreferrer"&gt;https://blogs.oracle.com/oraclemagazine/deliver-oracle-database-18c-express-edition-in-containers&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>database</category>
      <category>oracle</category>
    </item>
    <item>
      <title>Make NTFS writable again (on OSX)</title>
      <dc:creator>zankyr</dc:creator>
      <pubDate>Fri, 02 Jul 2021 16:08:24 +0000</pubDate>
      <link>https://dev.to/zankyr/make-ntfs-writable-again-on-osx-35kc</link>
      <guid>https://dev.to/zankyr/make-ntfs-writable-again-on-osx-35kc</guid>
      <description>&lt;p&gt;Long story short: &lt;a href="https://en.wikipedia.org/wiki/NTFS" rel="noopener noreferrer"&gt;NTFS&lt;/a&gt; is a proprietary filesystem, owned by Microsoft. And thanks to this, all the NTFS formatted hard drives are read-only on a OSX OS.&lt;/p&gt;

&lt;p&gt;Following you can find instructions on how to make NTFS writable again, depending on your operating system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ventura (13.0.1)&lt;/li&gt;
&lt;li&gt;Monterey (12.2.1)&lt;/li&gt;
&lt;li&gt;Mojave (10.14.6)&lt;/li&gt;
&lt;li&gt;Yosemite (10.10) and El Capitain (10.11)&lt;/li&gt;
&lt;li&gt;Useful links&lt;/li&gt;
&lt;li&gt;
Thanks to
&amp;lt;!-- TOC --&amp;gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ventura (13.0.1)
&lt;/h2&gt;

&lt;p&gt;Good news everyone!&lt;br&gt;
It is now possible to re-enable the NTFS writing.&lt;/p&gt;

&lt;p&gt;No more talk (really, the Italian "bando alla ciance" is way better).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 0:&lt;/strong&gt; &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;Homebrew&lt;/a&gt; should be installed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Update Xcode via Terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;xcode-select &lt;span class="nt"&gt;--install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Install osxfuse via Homebrew&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; osxfuse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Install NTFS-3G from Homebrew&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew tap gromgit/homebrew-fuse
brew &lt;span class="nb"&gt;install &lt;/span&gt;ntfs-3g-mac
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Change the mount location for your drive&lt;/p&gt;

&lt;p&gt;First list all the mounted drives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;diskutil list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Take note of the name of the drive you want to make readable. In our example we'll use &lt;code&gt;disk2s2&lt;/code&gt;:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuc9t70utyq2302pqd70i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuc9t70utyq2302pqd70i.png" alt="diskutil example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unmount the drive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;diskutil unmount /dev/disk2s2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new volume directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; /Volumes/NTFSDrive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mount your drive to new newly created folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; /usr/local/sbin/mount_ntfs /dev/disk2s2 /Volumes/NTFSDrive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the drive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;open /Volumes/NTFSDrive/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Monterey (12.2.1)
&lt;/h2&gt;

&lt;p&gt;Due to several security changes introduced in the previous versions (Big Sur or maybe Catalina), the operations described in this post no longer work.&lt;br&gt;
I'll update this section as soon as I'll discover a working workaround.&lt;/p&gt;
&lt;h2&gt;
  
  
  Mojave (10.14.6)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 0:&lt;/strong&gt; &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;Homebrew&lt;/a&gt; should be installed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Update Xcode via Terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;xcode-select &lt;span class="nt"&gt;--install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Disable the System Integrity Protection (SIP).&lt;br&gt;
Reboot your Mac, and when the boot screen appears (the one with the Apple logo), press CMD+R, and go into recovery mode.&lt;br&gt;
Once here, open the terminal from the menu' bar and execute the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;csrutil disable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the operation is successful, reboot the machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Install osxfuse via Homebrew&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ brew install --cask osxfuse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reboot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Install ntfs-3g&lt;br&gt;
The &lt;a href="https://formulae.brew.sh/formula/ntfs-3g#default" rel="noopener noreferrer"&gt;original Homebrew formulae&lt;/a&gt; has been disabled since it was not open-source software (you can find the entire motivation in the links at the end of the page).&lt;/p&gt;

&lt;p&gt;You can use &lt;a href="https://github.com/darelover/homebrew-ntfs-3g" rel="noopener noreferrer"&gt;a fork made by an user&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;darelover/ntfs-3g/ntfs-3g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Guess what? Reboot again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Mount point&lt;br&gt;
First, backup the original mount file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo mv&lt;/span&gt; /sbin/mount_ntfs /sbin/mount_ntfs.orig
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, create the new mount file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /usr/local/sbin/mount_ntfs /sbin/mount_ntfs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: &lt;code&gt;/usr/local/sbin/mount_ntfs&lt;/code&gt; should be a symbolic link to the folder created by ntfs-3g. Usually its path should be &lt;code&gt;/usr/local/Cellar/ntfs-3g/&amp;lt;version_number&amp;gt;/sbin&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Check&lt;br&gt;
Attach your hard drive. If you're lucky, everything should be working fine.&lt;/p&gt;

&lt;p&gt;But you can notice that in the Finder the files are not visible, you can see only folders (via Terminal you should see the entire filesystem correctly).&lt;/p&gt;

&lt;p&gt;If you are unlucky, follow this step.&lt;br&gt;
Using the Terminal, go in the ntfs-3g folder, make a backup of the &lt;code&gt;mount_ntfs file&lt;/code&gt; and create a new one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /usr/local/Cellar/ntfs-3g/&amp;lt;version_number&amp;gt;/sbin
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo mv &lt;/span&gt;mount_ntfs mount_ntfs.orig
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano mount_ntfs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy the following script in the new file you've just created:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
VOLUME_NAME="${@:$#}"
VOLUME_NAME=${VOLUME_NAME#/Volumes/}
USER_ID=501
GROUP_ID=20
TIMEOUT=20
if [ `/usr/bin/stat -f "%u" /dev/console` -eq 0 ]; then
        USERNAME=`/usr/bin/defaults read /Library/Preferences/com.apple.loginwindow | /usr/bin/grep autoLoginUser | /usr/bin/awk '{ print $3 }' | /usr/bin/sed 's/;//'`
        if [ "$USERNAME" = "" ]; then
                until [ `stat -f "%u" /dev/console` -ne 0 ] || [ $TIMEOUT -eq 0 ]; do
                        sleep 1
                        let TIMEOUT--
                done
                if [ $TIMEOUT -ne 0 ]; then
                        USER_ID=`/usr/bin/stat -f "%u" /dev/console`
                        GROUP_ID=`/usr/bin/stat -f "%g" /dev/console`
                fi
        else
                USER_ID=`/usr/bin/id -u $USERNAME`
                GROUP_ID=`/usr/bin/id -g $USERNAME`
        fi
else
        USER_ID=`/usr/bin/stat -f "%u" /dev/console`
        GROUP_ID=`/usr/bin/stat -f "%g" /dev/console`
fi

/usr/local/opt/ntfs-3g/bin/ntfs-3g \
         -o volname="${VOLUME_NAME}" \
         -o local \
         -o negative_vncache \
         -o auto_xattr \
         -o auto_cache \
         -o noatime \
         -o windows_names \
         -o user_xattr \
         -o inherit \
         -o uid=$USER_ID \
         -o gid=$GROUP_ID \
         -o allow_other \
         "$@" &amp;amp;&amp;gt; /var/log/mount-ntfs-3g.log

exit $?;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the file, save the world.&lt;/p&gt;

&lt;p&gt;Change the file's permissions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo chmod 555 mount_ntfs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remove and then reconnect your disk, et-voila'!.&lt;/p&gt;

&lt;h2&gt;
  
  
  Yosemite (10.10) and El Capitain (10.11)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 0 - ONLY FOR EL CAPITAIN:&lt;/strong&gt; Disable the System Integrity Protection (SIP).&lt;/p&gt;

&lt;p&gt;Reboot your Mac, and when the boot screen appears (the one with the Apple logo), press &lt;code&gt;CMD+R&lt;/code&gt;, and go into recovery mode.&lt;br&gt;
Once here, open the terminal from the menù bar and execute the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;csrutil disable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the operation is successful, reboot the machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Install osxfuse&lt;/p&gt;

&lt;p&gt;Download osxfuse and install it. Flag all the provided options when requested.&lt;br&gt;
Once the installation is finished, reboot the machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Install ntfs-3g&lt;/p&gt;

&lt;p&gt;Download and install ntfs-3g. Unfortunately this application is no longer maintained, but this version is still enough for our purposes.&lt;br&gt;
When asked, check the option &lt;em&gt;nocaching&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On El Capitain an error message could be displayed at the end of the installation process. Just ignore it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Reboot the system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Download and install fuse-wait.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Attach your hard drive and check that the disk is writable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5 - ONLY FOR EL CAPITAIN:&lt;/strong&gt; Re-enable the SIP&lt;br&gt;
Repeat the step 1, but now execute this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;csrutil &lt;span class="nb"&gt;enable&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the operation is successful, reboot the machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful links
&lt;/h2&gt;

&lt;p&gt;Homebrew: &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;https://brew.sh/&lt;/a&gt;&lt;br&gt;
ntfs-3g original formulae: &lt;a href="https://formulae.brew.sh/formula/ntfs-3g#default" rel="noopener noreferrer"&gt;https://formulae.brew.sh/formula/ntfs-3g#default&lt;/a&gt;&lt;br&gt;
Why ntfs-3g formulae has been disabled: &lt;a href="https://github.com/Homebrew/homebrew-core/pull/64491" rel="noopener noreferrer"&gt;https://github.com/Homebrew/homebrew-core/pull/64491&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanks to
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wpbeaches.com/how-to-write-to-windows-ntfs-usb-disk-drives-on-macos-macos-mojave-and-sierra/" rel="noopener noreferrer"&gt;https://wpbeaches.com/how-to-write-to-windows-ntfs-usb-disk-drives-on-macos-macos-mojave-and-sierra/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/takeit/9fa83840f3b2065e204dc9d52cef3693" rel="noopener noreferrer"&gt;https://gist.github.com/takeit/9fa83840f3b2065e204dc9d52cef3693&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/darelover/homebrew-ntfs-3g" rel="noopener noreferrer"&gt;https://github.com/darelover/homebrew-ntfs-3g&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/osxfuse/osxfuse/issues/574" rel="noopener noreferrer"&gt;https://github.com/osxfuse/osxfuse/issues/574&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.macbreaker.com/2014/06/how-to-enable-writing-to-ntfs-hard.html" rel="noopener noreferrer"&gt;http://www.macbreaker.com/2014/06/how-to-enable-writing-to-ntfs-hard.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://techsviewer.com/how-to-write-ntfs-drives-on-macos-ventura/" rel="noopener noreferrer"&gt;https://techsviewer.com/how-to-write-ntfs-drives-on-macos-ventura/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ntfs</category>
      <category>mac</category>
      <category>osx</category>
    </item>
  </channel>
</rss>
