Skip to content

Instantly share code, notes, and snippets.

View sualeh's full-sized avatar
⚠️
404 Not Found

Sualeh Fatehi sualeh

⚠️
404 Not Found
View GitHub Profile
@sualeh
sualeh / Issue167.java
Created March 1, 2018 01:57
SchemaCrawler Issue #167
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;
@sualeh
sualeh / Issue166.java
Last active February 22, 2021 23:28
SchemaCrawler Issue #166
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 / EBCDICToASCII_CodePrinter.java
Created April 21, 2018 23:15
EBCDIC to ASCII CodePrinter
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 / Issue239.java
Last active February 22, 2021 23:27
SchemaCrawler Issue #239
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 / Dockerfile
Last active April 24, 2023 12:30
Example of how to extend the SchemaCrawler Docker image
# ========================================================================
# 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 / How to Use git to Find Modified Files.md
Last active July 7, 2021 09:40
How to Use git to Find Modified Files

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 / Issue293.java
Last active February 22, 2021 23:26
SchemaCrawler Issue #293
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_sign_and_release_to_the_central_repository_with_github_actions.md
Last active April 5, 2024 05:55
How to Sign and Release to The Central Repository with GitHub Actions

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>
 loopback
@sualeh
sualeh / resume.json
Last active June 18, 2022 20:41
Sualeh Fatehi - JSON Resume
{
"meta": {
"theme": "short"
},
"basics": {
"name": "Sualeh Fatehi",
"label": "Software Engineer; Open Source Enthusiast; Team Manager",
"image": "",
"email": "sualeh@hotmail.com",
"url": "https://sualeh.github.io/",
@sualeh
sualeh / FlatOptionsTest.java
Created January 31, 2021 01:24
Getting injected parse results
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;