Skip to content

Instantly share code, notes, and snippets.

View ggrandes's full-sized avatar
🛠️
I may be slow to respond.

G.Grandes ggrandes

🛠️
I may be slow to respond.
View GitHub Profile
@ggrandes
ggrandes / Eclipse.Java.CodeStyle.Formatter.GGrandes.xml
Last active December 27, 2015 22:29
Eclipse Java CodeStyle Formatter (Indigo 3.7)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="ggrandes" version="12">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
@ggrandes
ggrandes / web.xml
Created November 10, 2013 15:08
Typical web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0" metadata-complete="true">
<display-name>test</display-name>
<servlet>
<servlet-name>test</servlet-name>
<servlet-class>com.acme.Servlet</servlet-class>
</servlet>
@ggrandes
ggrandes / log4j.properties
Created November 10, 2013 15:15
typical java log config (log4j / logback)
log4j.rootLogger=INFO, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %p %c %m%n
@ggrandes
ggrandes / LICENSE
Last active April 25, 2017 13:46
Apache 2.0 License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
@ggrandes
ggrandes / pom.xml
Last active December 27, 2015 22:29
typical pom.xml
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>bomb</artifactId>
<version>0.0.1</version>
<packaging>war</packaging>
<name>bomb</name>
<dependencies>
<dependency>
@ggrandes
ggrandes / main.c
Created November 10, 2013 16:05
typical main.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, const char *argv[]) {
printf("hello world\n");
exit(EXIT_SUCCESS);
}
@ggrandes
ggrandes / tomcat7-deploy.sh
Last active March 6, 2022 16:52
Automatic Deploy of Apache Tomcat (7.0.x; DEPRECATED; EOL 31/03/2021) and Log4J (1.2.x) (Linux)
#!/bin/bash
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ggrandes
ggrandes / self-signed-cert-generator.sh
Last active November 26, 2019 19:47
Self-Signed X.509 Certificates (Server/Client/Mail) with OpenSSL - Linux
#!/bin/bash
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ggrandes
ggrandes / certlink.sh
Created February 25, 2014 16:07
OpenSSL X.509 Certificate Linking / Verify
@ggrandes
ggrandes / markdown-bootstrap.pl
Last active November 26, 2019 19:48
Extract files and scripts from Markdown CodeBlocks for Bootstraping
#!/usr/bin/perl -wT
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.