This file contains 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
###### | |
# Author: Marcello de Sales (marcello.desales@gmail.com) | |
# Description: Create Create Environment Variables in EC2 Hosts from EC2 Host Tags | |
# | |
### Requirements: | |
# * Install jq library (sudo apt-get install -y jq) | |
# * Install the EC2 Instance Metadata Query Tool (http://aws.amazon.com/code/1825) | |
# | |
### Installation: | |
# * Add the Policy EC2:DescribeTags to a User |
This file contains 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 | |
#run certbot to renew certificate | |
certbot renew --pre-hook "service haproxy stop" --post-hook "service haproxy start" | |
#update certificate file for haproxy | |
DOMAIN='your-domain.com' sudo -E bash -c 'cat /etc/letsencrypt/live/$DOMAIN/fullchain.pem /etc/letsencrypt/live/$DOMAIN/privkey.pem > /etc/haproxy/certs/$DOMAIN.pem' |
This file contains 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
global | |
tune.ssl.default-dh-param 1024 | |
defaults | |
timeout connect 10000ms | |
timeout client 60000ms | |
timeout server 60000ms | |
frontend fe_http | |
mode http |
This file contains 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
import org.infinispan.configuration.parsing.ParserRegistry | |
import org.infinispan.jcache.embedded.JCacheManager | |
import org.infinispan.manager.DefaultCacheManager | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.boot.autoconfigure.cache.CacheProperties | |
import org.springframework.cache.annotation.EnableCaching | |
import org.springframework.context.annotation.Bean | |
import org.springframework.context.annotation.Configuration | |
import java.net.URI | |
import javax.cache.CacheManager |
This file contains 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
buildscript { | |
repositories { | |
jcenter() | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.elasticsearch.gradle:build-tools:6.4.3" | |
} | |
} |
This file contains 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
import android.graphics.Bitmap | |
import java.io.ByteArrayOutputStream | |
fun Bitmap.compressToByteArray(maxSize: Long, stepQuality: Int = 5): ByteArray? { | |
try { | |
val byteArrayOutputStream = ByteArrayOutputStream() | |
var compressionQuality = 100 | |
var byteArray: ByteArray? | |
do { | |
if (compressionQuality <= 0) return null |
This file contains 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/sh | |
for i in `openssl list-cipher-commands` | |
do | |
RES="decrypt/${i}.gif" | |
openssl $i -d -in $1 -out $RES -pass pass:$2 | |
if [ $? -eq 0 ]; then | |
echo "OK" | |
else | |
rm -rf $RES | |
fi |
This file contains 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
import org.apache.arrow.dataset.file.FileFormat; | |
import org.apache.arrow.dataset.file.FileSystemDatasetFactory; | |
import org.apache.arrow.dataset.jni.DirectReservationListener; | |
import org.apache.arrow.dataset.jni.NativeMemoryPool; | |
import org.apache.arrow.dataset.scanner.ScanOptions; | |
import org.apache.arrow.dataset.scanner.Scanner; | |
import org.apache.arrow.dataset.source.Dataset; | |
import org.apache.arrow.dataset.source.DatasetFactory; | |
import org.apache.arrow.memory.BufferAllocator; | |
import org.apache.arrow.memory.RootAllocator; |
This file contains 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
{ | |
"description": "DuckDB integration with Kotlin Dataframe", | |
"properties": [ | |
{ | |
"name": "duckdb-version", | |
"value": "0.10.2" | |
}, | |
{ | |
"name": "duckdb-database", | |
"value": "" |