Skip to content

Instantly share code, notes, and snippets.

Avatar

Yuriy Yunikov yyunikov

View GitHub Profile
@yyunikov
yyunikov / keybase.md
Created May 19, 2020
Keybase Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am yyunikov on github.
  • I am yyunikov (https://keybase.io/yyunikov) on keybase.
  • I have a public key whose fingerprint is 2A00 D425 978F 8360 7DF7 8DE0 044D 39FD 2C2B E011

To claim this, I am signing this object:

@yyunikov
yyunikov / kube.sh
Created May 15, 2018 — forked from gjyoung1974/kube.sh
Initialize Minikube - Local Kubernetes cluster on macOS
View kube.sh
#!/bin/bash
export KUBECONFIG=$HOME/.kube/config
#Download an OSX binary minikube
# minikube-darwin-amd64
#
# https://github.com/kubernetes/minikube/releases
# Put it somewhere that you can run it from: /usr/local/bin/minikube && chmod +x /usr/local/bin/minikube
# Download Docker Machine Hyperkit Driver
@yyunikov
yyunikov / FontsOverride.java
Last active Mar 2, 2017
Android: overriding default fonts
View FontsOverride.java
/*
* Copyright 2014 Yuriy Yunikov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@yyunikov
yyunikov / StringBruteForceGenerator.java
Created Jan 15, 2017
Brute force generator for different types of charsets
View StringBruteForceGenerator.java
public class StringBruteForceGenerator {
public static final char[] CYRILLIC_CHARSET = "абвгдеєжиіїйклмнопрстуфхцчшщьюя".toCharArray();
private char[] charset;
public StringBruteForceGenerator(final char[] charset) {
this.charset = charset;
}
View Docker cheat sheet
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@yyunikov
yyunikov / multiple_ssh_setting.md
Created May 18, 2016 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@yyunikov
yyunikov / PermissionUtils.java
Created Feb 18, 2016
Useful methods for requesting permissions on Android 6.0 and above
View PermissionUtils.java
public final class PermissionUtils {
private PermissionUtils() {}
public static void askPermissionIfNeeded(@NonNull final Activity activity,
@NonNull final View layoutView,
@StringRes final int message,
final int requestCode,
@NonNull final String[] permissions) {
if (!permissionsGranted(activity, permissions)) {
@yyunikov
yyunikov / HttpClientUtils.java
Created Jan 15, 2015
Usage of Apache Http Client
View HttpClientUtils.java
public final class HttpClientUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(HttpClientUtils.class);
private static final int CONNECTION_TIMEOUT = 10000;
private HttpClientUtils() {
}
/**
View RevealDrawable.java
package com.pixite.fragment.widget;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.view.Gravity;
@yyunikov
yyunikov / ErrorHandler.java
Last active Aug 29, 2015
Example of error handling for Java web applications
View ErrorHandler.java
@WebServlet("/error")
public class ErrorHandler extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
processError(request, response);
}
protected void doPost(HttpServletRequest request,