Skip to content

Instantly share code, notes, and snippets.

Avatar
⚠️
404 Not Found

Sualeh Fatehi sualeh

⚠️
404 Not Found
View GitHub Profile
@sualeh
sualeh / FlatOptionsTest.java
Created Jan 31, 2021
Getting injected parse results
View FlatOptionsTest.java
package schemacrawler.test.commandline.command;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import org.junit.jupiter.api.Test;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Model.CommandSpec;
@sualeh
sualeh / resume.json
Last active Jan 27, 2021
Sualeh Fatehi - JSON Resume
View resume.json
{
"meta": {
"theme": "kwan"
},
"basics": {
"name": "Sualeh Fatehi",
"label": "Software Engineer; Open Source Enthusiast; Team Manager",
"picture": "",
"email": "sualeh@hotmail.com",
"website": "https://www.schemacrawler.com",
@sualeh
sualeh / how_to_sign_and_release_to_the_central_repository_with_github_actions.md
Last active Apr 17, 2021
How to Sign and Release to The Central Repository with GitHub Actions
View how_to_sign_and_release_to_the_central_repository_with_github_actions.md

How to Sign and Release to The Central Repository with GitHub Actions

GitHub allows automated builds using GitHub Actions. A commonly asked question is how to release artifacts (packaged Java jars) built by Maven and Gradle to The Central Repository. The GitHub Actions documentation provides only part of the answer.

So, first, configure your Maven project for staging artifacts to The Central Repository, by reading through Configuring Your Project for Deployment and following those steps. Please make sure that the maven-gpg-plugin is configured to prevent gpg from using PIN entry programs, as follows:

<configuration>
  <gpgArguments>
      <arg>--pinentry-mode</arg>
      <arg>loopback</arg>
@sualeh
sualeh / Issue293.java
Last active Feb 22, 2021
SchemaCrawler Issue #293
View Issue293.java
import java.sql.Connection;
import schemacrawler.crawl.SchemaCrawler;
import schemacrawler.schema.Catalog;
import schemacrawler.schema.Column;
import schemacrawler.schema.Schema;
import schemacrawler.schema.Table;
import schemacrawler.schemacrawler.InfoLevel;
import schemacrawler.schemacrawler.InformationSchemaKey;
import schemacrawler.schemacrawler.RegularExpressionInclusionRule;
@sualeh
sualeh / How to Use git to Find Modified Files.md
Last active Jan 3, 2021
How to Use git to Find Modified Files
View How to Use git to Find Modified Files.md

Introduction

I keep a number of personal files on my computer, organized in folders. These could be photos, financial information, and so on. As I work with these files, I add to them, sometimes modify them to edit a photo, or add to notes, and move or rename them in various ways to reorganize. I wanted a good way to keep track of these changes.

My first thought is that I would write a Python program to scan the folders, and print MD5 checksums of each file in a readable way. This way, I could save off the old "index", and compare it with a new index using a standard diff tool. My attempt at this program is sualeh/diff-name-only. My disclaimer if you look at the code is that I am still teaching myself Python, and have not reached the heights of Pythonic Zen.

As I was writing this code, I was struck by how much of what I needed was already done by a standard source control system such as git. I could simply use git, and solve my problems. However, git keeps tr

@sualeh
sualeh / Dockerfile
Last active Feb 14, 2019
Example of how to extend the SchemaCrawler Docker image
View Dockerfile
# ========================================================================
# Example of how to extend the SchemaCrawler Docker image. See
# https://github.com/schemacrawler/SchemaCrawler-Docker
# for instructions on how to use.
# ========================================================================
FROM schemacrawler/schemacrawler
USER schcrwlr
WORKDIR /home/schcrwlr
@sualeh
sualeh / Issue239.java
Last active Feb 22, 2021
SchemaCrawler Issue #239
View Issue239.java
import static sf.util.Utility.isBlank;
import static us.fatehi.commandlineparser.CommandLineUtility.applyApplicationLogLevel;
import static us.fatehi.commandlineparser.CommandLineUtility.logSystemClasspath;
import static us.fatehi.commandlineparser.CommandLineUtility.logSystemProperties;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.logging.Level;
@sualeh
sualeh / EBCDICToASCII_CodePrinter.java
Created Apr 21, 2018
EBCDIC to ASCII CodePrinter
View EBCDICToASCII_CodePrinter.java
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.text.Normalizer;
public class EBCDICToASCII_CodePrinter
{
public static void main(final String[] args)
throws Exception
{
@sualeh
sualeh / Issue166.java
Last active Feb 22, 2021
SchemaCrawler Issue #166
View Issue166.java
package schemacrawler.issues;
import static us.fatehi.commandlineparser.CommandLineUtility.applyApplicationLogLevel;
import static us.fatehi.commandlineparser.CommandLineUtility.logSystemProperties;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.logging.Level;
@sualeh
sualeh / Issue167.java
Created Mar 1, 2018
SchemaCrawler Issue #167
View Issue167.java
import static us.fatehi.commandlineparser.CommandLineUtility.applyApplicationLogLevel;
import static us.fatehi.commandlineparser.CommandLineUtility.logSystemProperties;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;
import java.util.Iterator;
import java.util.logging.Level;
import javax.sql.DataSource;