This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a new keystore | |
keytool -genkey -alias alias_name -keystore new_keystore.jks | |
keytool -delete -alias alias_name -keystore new_keystore.jks | |
# Import 'alias_to_import' from 'old_keystore.jks' to the 'new_keystore.jks' as 'new_alies' | |
keytool -importkeystore -srckeystore old_keystore.jks -destkeystore new_keystore.jks -srcstoretype jks -deststoretype jks -srcalias alias_to_import -destalias new_alies | |
# You can compare certificates SHA fingerprint | |
keytool -list -v -keystore new_keystore.jks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import argparse | |
import re | |
import shutil | |
import sys | |
import tempfile | |
import time | |
import urllib.request as urlrequest | |
from pathlib import Path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#https://hamy.io/post/0009/how-to-install-luks-encrypted-ubuntu-18.04.x-server-and-enable-remote-unlocking/ | |
#https://www.kali.org/tutorials/secure-kali-pi-2018/ | |
#-k public ssh key | |
#-p dropbear initramfs port | |
DROPBEAR_OPTIONS='-s -j -k' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Heading(val weight: Int, val text: String) | |
data class Node(val heading: Heading, val children: MutableList<Node>) | |
/** | |
* Convert [headings] into structured [Node] | |
* | |
* @throws IllegalArgumentException if [headings] does not have any items | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.arch.lifecycle.ViewModel | |
import android.arch.lifecycle.ViewModelProvider | |
import android.support.v4.app.Fragment | |
import android.support.v4.app.FragmentActivity | |
import android.support.v7.app.AppCompatActivity | |
import dagger.Module | |
import dagger.Provides | |
import dagger.android.support.DaggerAppCompatActivity | |
import javax.inject.Inject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//copy core classes to the project gen folder | |
def includeCoreClasses = { Project p -> | |
p.android.libraryVariants.all { variant -> | |
def outputDir = p.file("$p.buildDir/generated/core/${variant.dirName}") | |
def packageName = variant.generateBuildConfig.appPackageName | |
def mergeTask = p.tasks.create(name: "merge${variant.name.capitalize()}CoreClasses", type: Copy) { | |
from(project(':core').android.sourceSets.main.java.srcDirs) { | |
filter { String line -> | |
if (line == 'package ru.solodovnikov.rxlocationmanager') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.solodovnikov.parcelabletest | |
import android.os.Parcel | |
import android.os.Parcelable | |
import io.github.benas.randombeans.EnhancedRandomBuilder | |
import io.github.benas.randombeans.api.Randomizer | |
import org.junit.Assert | |
import org.junit.Test | |
import org.junit.runner.RunWith | |
import org.mockito.Mockito |