Skip to content

Instantly share code, notes, and snippets.

View linnykoleh's full-sized avatar
🎯
Focusing

Oleh Linnyk linnykoleh

🎯
Focusing
View GitHub Profile
import java.util.Arrays;
public class SpeedUpTheCodeSin {
public static void main(String[] args) {
int N = 5;
int terms = 5;
float[] x = {0.5f, 1.0f, 1.5f, 2.0f, 2.5f};
float[] result = new float[N];
public class SpeedUpTheCodePicture {
public static void main(String[] args) {
checkPicture();
}
static boolean checkPicture() {
int n = 4096, count = 0;
var image = new byte[n][n];
for (int r = 0; r < n; r++) {
public class TriangleWithMaximumPerimeter {
public static void main(String[] args) {
var scanner = new java.util.Scanner(System.in);
var n = scanner.nextInt();
int[][] points = new int[n][2];
for (int i = 0; i < n; i++) {
import java.util.HashMap;
import java.util.Map;
public class PresentRusni {
public static void main(String[] args) {
var scanner = new java.util.Scanner(System.in);
var x = scanner.nextInt();
@linnykoleh
linnykoleh / command.txt
Created February 17, 2021 09:01 — forked from nrk/command.txt
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"

Becoming a Spring Certified Professional without the Core Spring Course

Until recently, the only way you could become a Certified Spring Professional was to take Pivotal’s compulsory, 4-day, Core Spring training course. On completion of the course, participants received an exam voucher that allowed them to schedule an exam at a certification centre.

At approximately £2.5k per attendee, the course is not cheap putting certification out of the reach of many self-funded developers and those that work for organisations without generous training budgets.

In May 2017 Pivotal changed their policy. Spring Certification Exams became available for individual purchase without enrolling in the course. I set out to see if it was possible to pass the exam without the Core Spring course and only using publically available material.

I set myself a budget of £250, ap

@linnykoleh
linnykoleh / pom.xml
Created August 25, 2020 12:13
Building docker image from maven
<build>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.12</version>
<executions>
<execution>
<id>tag-version</id>
<goals>
<goal>build</goal>
@linnykoleh
linnykoleh / bash
Created December 12, 2019 09:36 — forked from jonashackt/bash
Remote debugging Spring Boot
### java -jar
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar
### Maven
Debug Spring Boot app with Maven:
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001"

Compile FFmpeg on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide](https://ffmpeg.org/trac/ffmpeg/wiki/Fi

@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.