Skip to content

Instantly share code, notes, and snippets.

View BorzdeG's full-sized avatar
🏠
Working from home

Viktor Alenkov BorzdeG

🏠
Working from home
View GitHub Profile
@BorzdeG
BorzdeG / # pebble-sdk - 2018-08-20_10-54-17.txt
Created August 20, 2018 08:02
pebble-sdk (pebble/pebble-sdk/pebble-sdk) on macOS 10.13.6 - Homebrew build logs
Homebrew build logs for pebble/pebble-sdk/pebble-sdk on macOS 10.13.6
Build date: 2018-08-20 10:54:17
#!/usr/bin/env bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap buo/cask-upgrade
brew tap caskroom/fonts
brew tap caskroom/versions
brew tap homebrew/boneyard
brew tap homebrew/services
@BorzdeG
BorzdeG / docker.update_jdk.bash
Last active February 16, 2017 09:11
download docker image and unpack jdk
#!/usr/bin/env bash
JDK_TAG=8_jdk-dcevm_unlimited
DOCKER_IMAGE='anapsix/alpine-java:'$JDK_TAG
JDK_HOME=~/bin/$JDK_TAG
docker pull ${DOCKER_IMAGE}
update_jdk() {
echo 'update JDK version...'
@BorzdeG
BorzdeG / Dockerfile
Last active September 21, 2016 13:51
docker-custom-oracle-jvm
FROM buildpack-deps:jessie-curl
ENV JAVA_DOWNLOAD http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
ENV JAVA_DIR_ROOT /usr/lib/jvm/
ENV JAVA_HOME $JAVA_DIR_ROOT/jdk1.7.0_79
RUN set -x \
&& mkdir -p $JAVA_DIR_ROOT \
&& wget -c -O $JAVA_DIR_ROOT/jdk.tar.gz --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "$JAVA_DOWNLOAD" \
&& cd $JAVA_DIR_ROOT \
@BorzdeG
BorzdeG / docker_gc.bash
Created August 12, 2016 17:17
docker garbage images
docker_gc(){
docker rm -v $(docker ps --filter status=exited -q 2>/dev/null) 2>/dev/null
docker rmi $(docker images --filter dangling=true -q 2>/dev/null) 2>/dev/null
}
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8" />
<property name="severity" value="error" />
<!--Filters: http://checkstyle.sourceforge.net/config_filters.html -->
<module name="SuppressWarningsFilter" />
package demo;
import org.apache.commons.lang3.text.WordUtils;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
public class CamelCaseTests {
@DataProvider(name = "data")
public static Object[][] data() {
@BorzdeG
BorzdeG / ApplicationContextProvider.java
Created September 25, 2015 10:19
get Application Context in not spring beans
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.convert.ConversionService;
import org.springframework.stereotype.Component;
@Component
public class ApplicationContextProvider implements ApplicationContextAware {
@BorzdeG
BorzdeG / Spring.Boot.Server.Random.Port.java
Created September 15, 2015 11:53
Spring Boot :: set random server port
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.context.annotation.Configuration;
import java.io.IOException;
import java.net.ServerSocket;
@Configuration
@BorzdeG
BorzdeG / ~\.IntelliJIdeaNN\config\templates.xml
Last active February 8, 2016 11:58
Live template: field LOG for Slf4J
<templateSet group="user">
<template name="log" value="@SuppressWarnings(&quot;unused&quot;) private static final transient Logger LOG = LoggerFactory.getLogger($CLASS$.class.getName());" description="field LOG for Slf4J" toReformat="false" toShortenFQNames="true">
<variable name="CLASS" expression="className()" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="false" />
<option name="JAVA_EXPRESSION" value="false" />
<option name="JAVA_DECLARATION" value="true" />
<option name="JAVA_COMMENT" value="false" />
<option name="JAVA_STRING" value="false" />