Skip to content

Instantly share code, notes, and snippets.

View cchacin's full-sized avatar
🎯
Focusing

Carlos Chacin cchacin

🎯
Focusing
View GitHub Profile
@cchacin
cchacin / iTerm2-Local-Ollama-Prompt.txt
Created July 16, 2024 20:12
iTerm2 AI prompt to connect with Ollama local
Return commands suitable for executing directly into \(shell) on \(uname).
- Do not add any back quotes on the resulting command
- Do not add any description or explanation about the commmand
- Only show a single command
- No additional text besides the command to run
- Consider the target machine \(uname) to generate a command that works for the OS and CPU architecture
- Consider the aliases that are configured in the file ~/.aliases
The script should do this: \(ai.prompt)
@cchacin
cchacin / docker-compose.yml
Created October 31, 2020 03:28
Observability Containers - Docker Compose - Kibana - Graphana - ElasticSearch - Prometheus
version: "3.7"
services:
portainer:
image: portainer/portainer:1.24.1-alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/portainer_password:/tmp/portainer_password
ports:
- 9000:9000
command: -H unix:///var/run/docker.sock --no-auth
@cchacin
cchacin / jvm.properties
Created March 14, 2020 06:42
JVM GC Related Flags
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCDetails
-XX:+PrintGCApplicationStoppedTime

MicroProfile Metrics Counted

This is an example on how to use microprofile metrics in TomEE. The project includes a docker profile which can be used to create a Docker image.

Run the application:

@cchacin
cchacin / keybase.md
Created March 12, 2019 21:13
keybase.md

Keybase proof

I hereby claim:

  • I am cchacin on github.
  • I am cchacin (https://keybase.io/cchacin) on keybase.
  • I have a public key ASAYGkVTEuMIdYEZKAq7C_HPps7zN04Cw7SwseICUU7lago

To claim this, I am signing this object:

@cchacin
cchacin / docker-compose.yml
Last active February 23, 2019 22:59
ELK Stack
version: "3.7"
services:
filebeat:
image: docker.elastic.co/beats/filebeat-oss:6.6.1
container_name: filebeat
hostname: filebeat
depends_on:
- elasticsearch
environment:
package customers;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;
@cchacin
cchacin / Java Resources.md
Created January 30, 2019 00:48
List of useful java resources
@cchacin
cchacin / pojo.mustache
Created January 26, 2019 05:17
POJO mustache for SwaggerCodegen -> Java 8
{{>classJavadoc}}
{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{#additionalAnnotations}}
{{{additionalAnnotations}}}{{/additionalAnnotations}}
{{>generatedAnnotation}}
public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}} {
{{#vars}}
{{#isEnum}}
{{^isContainer}}
{{>modelInnerEnum}}
@cchacin
cchacin / CallTest.java
Created December 20, 2018 16:48
Http2Client => OkHttp Call.Factory
package cronus.core;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Handshake;