Skip to content

Instantly share code, notes, and snippets.

@lcamilo15
lcamilo15 / .env.DEV.enc
Created February 26, 2024 05:11 — forked from psenger/.env.DEV.enc
[OpenSSL Encrypted Environment Variables] #OpenSSL #TravisCi #CodeShip #AWS #Docker #Swarm
U2FsdGVkX18bL0goCbiTjHFGnkwWagZSYjhvkaU1hXA=
@lcamilo15
lcamilo15 / gist:2cf68ce349ce24f9951aee9b69086af8
Created June 4, 2019 18:16 — forked from deviantony/gist:ddb93425dc6f011c4d8b
SH entrypoint for docker-compose to manage dependency startup.
#!/usr/bin/env sh
# Wait for a HTTP service to be OK (return code 200) before trying to start another service.
echo "Stalling for SERVICE"
while true; do
status=$(curl --write-out %{http_code} --silent --output /dev/null http://service.domain/endpoint)
echo "Status: ${status}"
if [ "${status}" == "200" ]; then
break
else
@lcamilo15
lcamilo15 / android-sonar.gradle
Created March 29, 2018 17:57 — forked from mjdetullio/android-sonar.gradle
Configuring Android project for SonarQube
import com.android.build.gradle.AppPlugin
task consolidateJunitXml {
description 'Copies JUnit XML reports into a single directory so SonarQube can import them all'
doLast {
def dest = file("${buildDir}/allJunit")
delete dest
copy {
from "${buildDir}/test-results/debug"
into dest
@lcamilo15
lcamilo15 / docker-compose.yml
Created March 21, 2018 17:44 — forked from huksley/docker-compose.yml
Launches fully configured Graylog 2.3.1 instance
#
# Launches configured Graylog 2.3.1 instance
#
# - Docker-compose 1.16 required
# - Please configure following according to your network:
# * gelf-address URL (for each container)
# * GRAYLOG_WEB_ENDPOINT_URI
# - After launch define GELF tcp and GELF udp inputs in graylog web ui
# - Containers send logging to the graylog itself
# - By default tuned to 30 days retention
@lcamilo15
lcamilo15 / HttpsFilter.java
Created February 27, 2018 02:13 — forked from qerub/HttpsFilter.java
Servlet filter for forcing HTTPS when behind a SSL termination proxy that sends X-Forwarded-Proto
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import static java.lang.String.format;
public class HttpsFilter implements Filter {
@lcamilo15
lcamilo15 / disable_vim_auto_visual_on_mouse.txt
Created January 5, 2018 01:50 — forked from u0d7i/disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
@lcamilo15
lcamilo15 / install-comodo-ssl-cert-for-nginx.rst
Created September 27, 2017 01:33 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@lcamilo15
lcamilo15 / gist:0ca9e9757f16cf275ecf3e1bdf2ca715
Created August 31, 2017 06:55 — forked from briandealwis/gist:782862
One-liner to turn jar with Main-Class into executable shell script
# turn a jar with a Main-Class into a stand alone executable
(echo '#!/usr/bin/env java -jar'; cat blahblah.jar) > blah
# turn a jar with a particular main clas into a stand alone executable
(echo '#!/usr/bin/env java -jar package.MainClass'; cat blahblah.jar) > blah
@lcamilo15
lcamilo15 / SSLPoke.java
Created July 11, 2017 12:33 — forked from 4ndrej/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the commet #1 for howto.
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {
#!/bin/bash
if [ -z "$1" ]; then
readonly test_mode=false
else
echo "Running TEST mode. No destructive changes"
readonly test_mode=true
fi
JQPATH=$(which jq)