Skip to content

Instantly share code, notes, and snippets.

View Scuilion's full-sized avatar
👻

Kevin O'Neal Scuilion

👻
View GitHub Profile
@helpermethod
helpermethod / gradle.sh
Last active November 21, 2018 17:15
Working transparently with Gradle and the Gradle Wrapper
gradle() {
[[ -f gradlew ]] && ./gradlew "$@" || command gradle "$@"
}
@sandor-nemeth
sandor-nemeth / PropertyLogger.java
Last active June 6, 2024 08:17
Spring Boot - Log all configuration properties on application startup
package io.github.sandornemeth.spring;
import java.util.Arrays;
import java.util.stream.StreamSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.core.env.AbstractEnvironment;
@welshstew
welshstew / snippet.xml
Created April 6, 2016 09:58
docker assembly.xml files and stuff for the docker-maven-plugin (adding extra stuff into the base image)
<!-- structure of project (in xml) X-D -->
<src>
<main>
<docker>
<amq-62>
<opt>
<amq>
<bin>configure.sh (empty shell file to override the s2i configure.sh)</bin>
<conf>activemq.xml file (fully configured as you want it to be)</conf>
@frioux
frioux / ego-boost.sh
Created January 7, 2016 19:01
How many stars do you have in total?
#!/bin/dash
ego=${1:-frioux}
count=0
for repo in $(git hub repos --raw $ego); do
inner_count=$(git hub stars $repo --raw | grep -v $ego | wc -l)
count=$(($count + $inner_count))
echo "$repo: $inner_count"
done
@javierarques
javierarques / protractorAPICheatsheet.md
Last active August 20, 2024 11:27
Protractor API Cheatsheet
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 13, 2024 22:21
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@vdevigere
vdevigere / standalone.xml
Created October 23, 2014 23:56
Disabling the default logging in Wildfly and use application provided log4j and slf4j libraries
<subsystem xmlns="urn:jboss:domain:logging:2.0">
<add-logging-api-dependencies value="false"/>
<use-deployment-logging-config value="false"/>
....
</subsystem>
@wonderb0lt
wonderb0lt / OverviewResource.java
Created April 15, 2014 13:11
A JAX-RS resource that shows all bound methods in the current context (RestEasy only)
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@dmglab
dmglab / git_bible.md
Last active March 9, 2024 02:59
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples

@ksafranski
ksafranski / expecting.md
Last active November 11, 2023 23:00
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect