Skip to content

Instantly share code, notes, and snippets.

View tasdemirbahadir's full-sized avatar
🎯
Focusing

Bahadir Tasdemir tasdemirbahadir

🎯
Focusing
View GitHub Profile
@nickrussler
nickrussler / wait_for_mem_available.sh
Last active October 6, 2020 13:28
Wait with bash for some amount of memory (MemAvailable) to be available
#!/bin/bash
# Wait for MemAvailable to be bigger than a certain value.
#
# $1 - Value in kb that MemAvailable should be greater than.
# $2 - (Optional, Default=60) Timeout in seconds
#
# Examples
#
# wait_for_mem_available 10000000 120
@umit
umit / RetryRestTemplate.java
Last active May 29, 2018 15:25
RetryRestTemplate
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;
import reactor.retry.Retry;
import reactor.retry.RetryExhaustedException;
import java.time.Duration;
import java.util.function.Supplier;
@Component
@jpt1122
jpt1122 / StrangeImageTest.java
Created July 23, 2014 11:02
Solution for this Exception : Numbers of source Raster bands and source color space components do not match when i read image
import java.awt.image.BufferedImage;
import java.awt.image.Raster;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;