Skip to content

Instantly share code, notes, and snippets.

Wow, github such social now

Ivan Muratov binakot

Wow, github such social now
Block or report user

Report or block binakot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
binakot /
Created Sep 6, 2019
Fix OpenJDK error with SSL: the trustAnchors parameter must be non-empty
rm -rf /etc/ssl/certs/java/cacerts
update-ca-certificates -f
binakot / macos-java-switch.bash
Created May 23, 2019
Aliases for different java version on MacOS
View macos-java-switch.bash
$ touch ~/.bash_profile
$ nano ~/.bash_profile
alias j12="export JAVA_HOME=`/usr/libexec/java_home -v 12`; java -version"
alias j11="export JAVA_HOME=`/usr/libexec/java_home -v 11`; java -version"
alias j10="export JAVA_HOME=`/usr/libexec/java_home -v 10`; java -version"
alias j9="export JAVA_HOME=`/usr/libexec/java_home -v 9`; java -version"
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version"
alias j7="export JAVA_HOME=`/usr/libexec/java_home -v 1.7`; java -version"
View docker-compose.yml
version: '3.4'
image: postgres:10
restart: always
- POSTGRES_DB=monaba
binakot /
Last active Nov 12, 2018
The tasks by Virgil Security on HighLoad++ 2018 in Moscow.
import subprocess
import time
from itertools import product
from string import ascii_lowercase
def brute_force(assumption):
result =['passw0rd',
binakot / AsyncWriteFile.cs
Last active Jan 29, 2018
.NET 3.5 Async Write File. Read & Write 1 GB file in async mode with elapsed time metrics.
View AsyncWriteFile.cs
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
namespace AsyncReadWriteApplication
public static class Program
public static void Main()
binakot /
Last active Nov 28, 2017
Docker stats with container names. Working on Linux and Windows.
$ docker stats --format "table {{.Container}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"
binakot / logstash.conf
Last active Jun 23, 2018
Logstash configuration file for Docker Swarm + Spring Cloud + Netflix OSS. Using Logback JSON Encoder in Spring Boot applications. Docker container -> Docker unix socket -> Logspout -> Logstash.
View logstash.conf
input {
# The default protocol is UDP.
udp {
port => 5000
codec => json {
charset => "UTF-8"
# But it is possible to change to TCP by adding +tcp after the logstash protocol when starting your container.
binakot /
Last active Aug 26, 2016
PECS (provider - extends, consumer - super)
// If a parameterized type represents a T provider, use <? extends T>
// If it represents a T consumer, use <? super T>.
public static <T> T max(Collection<? extends T> col, Comparator<? super T> comp) { }
public class Test {
public static void main(String[] args) {
try {
System.out.println("Don't program like this!");
} catch (RuntimeException e) {
System.out.println("Got it.");
You can’t perform that action at this time.