Skip to content

Instantly share code, notes, and snippets.

View DavidPerezIngeniero's full-sized avatar

David Pérez Carmona DavidPerezIngeniero

View GitHub Profile
@tuantranf
tuantranf / create-aws-ecr-authentication-cronjob.md
Created September 16, 2019 03:22
A Kubernetes cronjob to refresh ECR authentication

A Kubernetes cronjob to refresh ECR authentication

Create AWS secret

kubectl create secret generic aws-secret --from-literal=AWS_ACCOUNT= --from-literal=AWS_ACCESS_KEY_ID= --from-literal=AWS_SECRET_ACCESS_KEY= --from-literal=AWS_DEFAULT_REGION= --from-literal=AWS_REGION=

Create cronjob

@dideler
dideler / bot.rb
Last active May 10, 2024 14:55
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@densh
densh / scoped-implicit-lifetimes.md
Last active October 18, 2020 17:02
Scoped Implicit Lifetimes

Scoped Implicit Lifetimes

All things considered, our experience in Scala Native has shown that resource management in Scala is way harder than it should be. This gist presents a simple design pattern that makes it resource management absolutely hassle-free: scoped implicit lifetimes.

The main idea behind it is to encode resource lifetimes through a concept of an implicit scope. Scopes are necessary to acquire resources. They are responsible for disposal of the resources once the evaluation exits the

@allixender
allixender / geotools-jai-build.sbt
Last active July 19, 2019 09:50
To get GeoTools dependencies for Scala/SBT with JAI right on public build servers like Travis
// val geotoolsVersion = "8.7"
val geotoolsVersion = "9.5"
// val geotoolsVersion = "10.8"
// val geotoolsVersion = "11.3"
// val geotoolsVersion = "12.0"
// val geotoolsVersion = "13-SNAPSHOT"
libraryDependencies ++= Seq(
"org.geotools" % "gt-epsg-hsql" % geotoolsVersion,
"org.geotools" % "gt-referencing" % geotoolsVersion,
@dpryden
dpryden / ClassLoaderLeakExample.java
Created October 20, 2014 00:01
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,