Skip to content

Instantly share code, notes, and snippets.

View MrChebik's full-sized avatar

Aleksandr Beschasnyi MrChebik

  • Ukraine, Zaporozhye
View GitHub Profile
public class CollectorAutocompleteText {
public static String[] flag;
public static List<String> packageName;
public static List<String> returnTypeS;
static {
flag = new String[] {"A", "C", "I", "M", "V", "?"};
packageName = new ArrayList<>();
returnTypeS = new ArrayList<>();
}
@MrChebik
MrChebik / Main.java
Created August 9, 2018 00:16
[BUG] [JavaFX] [Java 10] Resizable
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage stage) {
stage.setResizable(false);
stage.setScene(new Scene(new Group()));
@MrChebik
MrChebik / js
Created March 19, 2018 17:49
matrix
$(poster).on("mousemove", function(event) {
if (isPrestaged == 1) {
var x = event.pageX - offsetX;
var y = event.pageY - offsetY;
if (x > half_width) {
out_x = (x / half_width * 5) - 5;
} else {
out_x = -5 + (x / half_width * 5);
}
@MrChebik
MrChebik / css
Created March 19, 2018 17:48
moving bubbles
.actor, .actor-button {
position: absolute;
bottom: -100%;
width: 100px;
height: 100px;
background: rgba(230, 230, 230, 1);
border-radius: 50px;
transition: .5s ease;
}
public static void main(String[] args) {
final int[] pinger = {0};
System.out.println("WELL, PRINCE, so Genoa and Lucca are now just family estates of the Buonapartes. But I warn you, if you don't tell me that this means war, if you still try to defend the infamies and horrors perpetrated by that Antichrist I really believe he is Antichrist I will have nothing more to do with you and you are no longer my friend, no longer my 'faithful slave', as you call yourself! But how do you do? I see I have frightened you sit down and tell me all the news."
.trim().chars().mapToObj(i -> (char) i).reduce(
new ArrayList<String>(Collections.singletonList("")),
(array, ch) -> {
if (Character.isWhitespace(ch)) {
pinger[0] = 1;
} else {
public static void main(String[] args) {
final int[] pinger = {0};
System.out.println("WELL, PRINCE, so Genoa and Lucca are now just family estates of the Buonapartes. But I warn you, if you don't tell me that this means war, if you still try to defend the infamies and horrors perpetrated by that Antichrist I really believe he is Antichrist I will have nothing more to do with you and you are no longer my friend, no longer my 'faithful slave', as you call yourself! But how do you do? I see I have frightened you sit down and tell me all the news."
.trim().chars().mapToObj(i -> (char) i).collect(Collector.of(
(Supplier<List<String>>) ArrayList::new,
(array, ch) -> {
if (array.size() == 0) {
array.add("");
}
public class Main {
private static final int NUMBER_OF_CORES = Runtime.getRuntime().availableProcessors();
public static void main(String[] args) {
Stream.of("WELL, PRINCE, so Genoa and Lucca are now " +
"just family estates of the Buonapartes. But I " +
"warn you, if you don't tell me that this means " +
"war, if you still try to defend the infamies and " +
"horrors perpetrated by that Antichrist I real- " +
"ly believe he is Antichrist I will have nothing " +
sh /path/to/script.sh > log.txt 2>&1 &
@MrChebik
MrChebik / pngquant
Last active September 24, 2017 17:13
--Install
Mageia:
Download libpng(16) (sourceforge, read INSTALL)
$ git clone --recursive https://github.com/pornel/pngquant.git
$ make
$ make install
--In action
$ pngquant --speed 1 /path/to/image.png
@MrChebik
MrChebik / mozjpeg
Last active September 24, 2017 17:12
--Install
CentOS6:
$ yum install wget autoconf automake gcc nasm git
$ wget https://github.com/mozilla/mozjpeg/releases/download/v3.1/mozjpeg-3.2-release-source.tar.gz
$ tar xvfz mozjpeg-3.2-release-source.tar.gz
$ cd mozjpeg
$ ./configure
$ make
$ make install