Skip to content

Instantly share code, notes, and snippets.

View enryold's full-sized avatar

Enrico Vecchio enryold

  • AudienceRate
  • Milan, IT
View GitHub Profile
@enryold
enryold / ScheduledEvent.java
Created October 31, 2018 08:23
AWS Cloudwatch scheduled event class for Java
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Arrays;
/**
* Created by enryold on 27/04/17.
*/
public class ScheduledEvent {
@JsonProperty("account")
@enryold
enryold / CointrackingAPI.java
Created July 20, 2018 10:33
CoinTracking API - Java Example
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.InvalidKeyException;
@enryold
enryold / IJedisCommand
Last active July 5, 2018 17:45
Wrapper class for Jedis/JedisCluster as common class to use same interface methods.
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import java.util.Optional;
import java.util.function.Function;
@FunctionalInterface
public interface IJedisCommand<T> {
Optional<T> execute(JedisPool pool, Function<Jedis, T> function);
@enryold
enryold / FnEncodeBytesAsFirehose.java
Last active September 8, 2021 06:48
Java classes for Kinesis Firehose record transformation lambda
import com.amazonaws.protocol.json.JsonClientMetadata;
import com.amazonaws.protocol.json.SdkJsonProtocolFactory;
import com.amazonaws.protocol.json.StructuredJsonGenerator;
import com.amazonaws.services.kinesisfirehose.model.Record;
import com.amazonaws.services.kinesisfirehose.model.transform.RecordJsonMarshaller;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.nio.ByteBuffer;
import java.util.function.Function;
{
"objects": [
{
"myComment": "This object is used to set default configuration for objects in the pipeline.",
"id": "Default",
"name": "Default",
"failureAndRerunMode": "CASCADE",
"schedule": {
"ref": "DefaultSchedule"
@enryold
enryold / storage-efs-mountfilesystem.config
Created January 16, 2017 16:27
EFS mount file system script for Elastic Beanstalk .ebconfig
#
# Replace FILESYSTEM-ID-HERE and REGION-ID-HERE
#
option_settings:
- option_name: EFS_VOLUME_ID
value: FILESYSTEM-ID-HERE
- option_name: EFS_REGION
value: REGION-ID-HERE
Abbondanza
Acilia
Ada
Adalberta
Adalgisa
Addolorata
Adelaide
Adelasia
Adele
Adelina
Abaco
Abbondanzio
Abbondio
Abdone
Abelardo
Abele
Abenzio
Abibo
Abramio
Abramo