Skip to content

Instantly share code, notes, and snippets.

View john-evangelist's full-sized avatar

Evangelista john-evangelist

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="red_50">#fde0dc</color>
<color name="red_100">#f9bdbb</color>
<color name="red_200">#f69988</color>
<color name="red_300">#f36c60</color>
<color name="red_400">#e84e40</color>
<color name="red_500">#e51c23</color>
package demo;
import static java.lang.reflect.Modifier.*;
import java.util.Arrays;
import java.util.Set;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.BeanExpressionResolver;
@john-evangelist
john-evangelist / gist:de792aae3313b801099d
Last active September 9, 2015 01:53
Simple node.js code style tips to improve code quality

Whether you use 2 spaces or 4 spaces, there are a few simple things that can make your node.js code easier to read. We've been using them in all the hapi modules for over 4 years now to great results. This list is by no means complete but it highlights the most useful elements that will give you immediate value in reducing bugs.

Required modules

JavaScript makes it harder than most languages to know where variables are coming from. Variables assigned required modules are particularly important because they represent a singleton object shared with the entire application. There are also globals and module globals, along with function variables and arguments.

Traditionally, variables starting with an uppercase letter represent a class that must be instantiated using new. This was an important semantic in the early days of JavaScript but at this point, if you don't know Date requires new Date() you are probably very new. We have adopted Upper Camel Case variable names for all module global variables

@john-evangelist
john-evangelist / USING-VAULT.md
Created November 29, 2015 04:13 — forked from voxxit/USING-VAULT.md
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@john-evangelist
john-evangelist / IntelliJ_IDEA__Perf_Tuning.txt
Created December 14, 2015 18:54 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@john-evangelist
john-evangelist / step-by-step-gatling-idea.md
Created March 11, 2016 14:09 — forked from groovybayo/step-by-step-gatling-idea.md
Gatling: Step by step guide to IntelliJ integration

Step by step guide to setting up IDEA to write gatling simulations

Prerequisites:

Have [SBT plugin][sbt-plugin] installed

Begin

  • [Create a new project][create-project] in IDEA ( File > New Project ...)
    • Make sure you select a maven module
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="AndroidStyle">
<option name="JAVA_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="8" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
@john-evangelist
john-evangelist / cassandra_intellij.xml
Created March 11, 2016 14:10
Intellij code style formater for Apache Cassandra
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="cassandra-intellij">
<option name="LINE_SEPARATOR" value="&#10;" />
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="java" withSubpackages="true" static="false" />
<package name="javax" withSubpackages="true" static="false" />
<emptyLine />
<package name="com.google.common" withSubpackages="true" static="false" />
<package name="org.apache.commons" withSubpackages="true" static="false" />
@john-evangelist
john-evangelist / Wildfly.xml
Created March 11, 2016 14:10 — forked from foo4u/Wildfly.xml
Wildfly Code Style for IntelliJ
<code_scheme name="Wildfly">
<option name="LINE_SEPARATOR" value="&#10;" />
<option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="9999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="9999" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value>
<package name="org.junit.Assert" withSubpackages="false" static="true" />
<package name="org.rendersnake.HtmlAttributesFactory" withSubpackages="false" static="false" />
<package name="org.mockito.Mockito" withSubpackages="true" static="true" />
@john-evangelist
john-evangelist / Dockerfile
Created May 9, 2016 15:36 — forked from eluleci/Dockerfile
Dockerfile for Android CI
############################################################
# Dockerfile to build Android project and use Jenkins CI
#
############################################################
FROM ubuntu:14.04
MAINTAINER eluleci <[email protected]>
RUN apt-get update