This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # I encountered this error when using `Mapped[uuid.UUID]` in my sqlalchemy 2.0 data models in conjuntion with BigQuery: | |
| # sqlalchemy.exc.DatabaseError: (google.cloud.bigquery.dbapi.exceptions.DatabaseError) 400 POST https://bigquery.googleapis.com/bigquery/v2... Type not found: CHAR at [3:14] | |
| # requirements: | |
| # pip install sqlalchemy-bigquery=1.11.0.dev2 | |
| # Here is the fix: | |
| from operator import attrgetter | |
| from sqlalchemy.types import TypeDecorator, String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package services | |
| import java.io._ | |
| import java.nio.charset.StandardCharsets | |
| import java.util.zip.{ZipEntry, ZipOutputStream} | |
| object EPubGenerator extends App { | |
| // based on examples found here https://idpf.github.io/epub3-samples/30/samples.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Portable script (Linux, Mac/BSD) to detect the folder with the newest version. | |
| # Assume: | |
| # We have a folder structure like this: | |
| # | |
| # /path/to/my_program/my-program-0.1.0/ | |
| # /path/to/my_program/my-program-0.5.0/ | |
| # /path/to/my_program/my-program-0.10.0/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Background: This is useful to download executable JARs, | |
| # so wie can use Artifactory+Maven like an "App Store for Java services". | |
| # This will download the newest version, | |
| # but you can also declare a specific version number. | |
| VERSION="LATEST" | |
| ARTIFACT="com.hazelcast:hazelcast-all:$VERSION:jar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # For example a non-Maven pipelie builds something, | |
| # but you want that it can be used by Maven... | |
| WORKSPACE="/path/to/workspace" | |
| ARTIFACT="my-artifact" | |
| ARTY="your.arty.tdl" | |
| # Assumption that a version number is part of the artifact's name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This cron-file should be deployed to crond: | |
| # $ crontab cronic-monitoring | |
| # Crond will start your services and checks for example every minute, if they are alive. | |
| # Examples: | |
| * * * * * bash -l -c "/abs/path/to/servicename_cronic-monitoring.sh config_a /abs/path/to/servicename_home" | |
| * * * * * bash -l -c "/abs/path/to/servicename_cronic-monitoring.sh config_b /abs/path/to/servicename_home" |