Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / app.js
Last active May 15, 2019 21:36 — forked from kernow/gist:840796
mongo mongodb mongoose create find all
var sys = require('sys')
, mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test_mongoose');
// Models
var Schema = mongoose.Schema;
@jrichardsz
jrichardsz / hello-world-pom.xml
Created June 19, 2019 03:59 — forked from rcwalker/hello-world-pom.xml
Hello World With Maven
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>local</groupId>
<artifactId>hello-world</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>hello-world</name>
@jrichardsz
jrichardsz / docker-compose.yml
Created September 29, 2019 02:57 — forked from pantsel/docker-compose.yml
example docker-compose.yml for kong, postgres and konga
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@jrichardsz
jrichardsz / mysql wordpress docker
Created October 23, 2019 16:16 — forked from crissanis/mysql wordpress docker
mysql wordpress docker
docker run --name eduxdb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=noloveas -d mysql:5.7
docker run --name some-wordpress -p 8080:80 -e WORDPRESS_DB_HOST=10.16.211.194:3306 \
-e WORDPRESS_DB_USER=root -e WORDPRESS_DB_PASSWORD=noloveas -d wordpress
@jrichardsz
jrichardsz / simple-https-server.py
Last active December 30, 2019 19:29 — forked from dergachev/simple-https-server.py
simple https server
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# create file : https-server.py with the followinfg code
import BaseHTTPServer, SimpleHTTPServer
import ssl
httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='./server.pem', server_side=True)
httpd.serve_forever()
@jrichardsz
jrichardsz / setVariable.groovy
Created January 5, 2020 13:22 — forked from felipebizz/setVariable.groovy
[Mule] Set variable value inside Groovy
<flow name="get:/setVariable:api-config">
<set-variable variableName="username" value="" doc:name="username"/>
<scripting:component doc:name="Groovy">
<scripting:script engine="Groovy">
<![CDATA[
String value = 'felipe'
message.setInvocationProperty('username', value)
]]></scripting:script>
</scripting:component>
@jrichardsz
jrichardsz / docker-ps-vertical
Last active April 17, 2020 22:38 — forked from wzulfikar/docker-ps-vertical
vertical format for docker ps
export FORMAT="ID\t{{.ID}}\nNAME\t{{.Names}}\nIMAGE\t{{.Image}}\nPORTS\t{{.Ports}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.CreatedAt}}\nSTATUS\t{{.Status}}\n"
// usage:
docker ps --format="$FORMAT"
@jrichardsz
jrichardsz / wrapper.conf
Created August 21, 2020 16:08 — forked from samukasmk/wrapper.conf
Exemplo de wrapper.conf do mule
#encoding=UTF-8
#********************************************************************
# System Properties
#********************************************************************
# Location of your Mule installation.
wrapper.java.additional.1=-Dmule.home="%MULE_HOME%"
wrapper.java.additional.1.stripquotes=TRUE
wrapper.java.additional.2=-Dmule.base="%MULE_HOME%"
wrapper.java.additional.2.stripquotes=TRUE
@jrichardsz
jrichardsz / Dockerfile: client-side app
Last active August 25, 2020 03:37 — forked from nileshgulia1/Dockerfile: client
Docker nodejs client-side snippet
# base image
FROM node:12.2.0-alpine
# set working directory
WORKDIR /app
#copy source code
COPY . /app/
# execute standard nodejs commands
@jrichardsz
jrichardsz / test_results.html
Created August 27, 2020 18:15
A nice HTML test results report template
<html>
<head>
<title>
Test Report
</title>
<style type="text/css">
.test-result-table {
border: 1px solid black;