Skip to content

Instantly share code, notes, and snippets.

View linnykoleh's full-sized avatar
🎯
Focusing

Oleh Linnyk linnykoleh

🎯
Focusing
View GitHub Profile
#!/bin/sh
git filter-branch --env-filter '
OLD_NAME="Admin"
CORRECT_NAME="LinnykOleh"
CORRECT_EMAIL="linnik.oleg.93@gmail.com"
if [ "$GIT_COMMITTER_NAME" = "$OLD_NAME" ]
then
@linnykoleh
linnykoleh / README.md
Created April 19, 2018 15:06 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

OP: @leonardofed founder @ plainflow.


@linnykoleh
linnykoleh / Exclude maven profile
Created December 27, 2017 08:56 — forked from regis-leray/Exclude maven profile
Exclude maven profile
mvn clean install '-P!CommercialDBJars,!MediumTests'
@linnykoleh
linnykoleh / Free O'Reilly Books.md
Created October 3, 2017 10:57 — forked from augbog/Free O'Reilly Books.md
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@linnykoleh
linnykoleh / docker-cleanup-resources.md
Last active August 30, 2018 12:01 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete containers

docker ps
docker ps -a

docker rm $(docker ps -a -q)

@linnykoleh
linnykoleh / logback.xml
Created August 10, 2017 07:57 — forked from jcraane/logback.xml
Sample logback.xml file with console and rolling file appender. The rollover is time based (daily) and size based, 5MB.
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>UTF-8</charset>
<Pattern>%d %-4relative [%thread] %-5level %logger{35} - %msg%n</Pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
public class ThreadSafeSingleton {
private static ThreadSafeSingleton instance;
private ThreadSafeSingleton(){
}
public static synchronized ThreadSafeSingleton getInstance(){
if(instance == null){
public class StaticSingleton {
private static StaticSingleton instance = new StaticSingleton();
private StaticSingleton(){
}
public static StaticSingleton getInstance(){
return instance;
public class LazySingleton {
private static LazySingleton instance;
private LazySingleton(){
}
public static LazySingleton getInstance(){
if(instance == null){
public V get(Object key) {
Entry<K, V> entry = getEntry(key);
return (entry == null ? null : entry.value);
}
private Entry<K, V> getEntry(Object key) {
if (comparator != null) {
return getEntryUsingComparator(key);
}
if (key == null) {