Skip to content

Instantly share code, notes, and snippets.

View sergeykomlach's full-sized avatar

Serhii Komlach sergeykomlach

View GitHub Profile
while :;do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(printf "\U$(($RANDOM % 500))");sleep 0.05;done|gawk '{a[$3]=0;for (x in a){o=a[x];a[x]=a[x]+1;printf "\033[%s;%sH\033[2;32m%s",o,x,$4;printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,$4;if (a[x] >= $1){a[x]=0;} }}'
private AccessibilityNodeInfoCompat getActiveWindows(String pkg) {
List<AccessibilityWindowInfo> windows = serviceA11y.getWindows();
if (windows != null) {
for (AccessibilityWindowInfo windowInfo : windows) {
if (windowInfo != null) {
try {
if (windowInfo.getType() == AccessibilityWindowInfo.TYPE_APPLICATION) {
AccessibilityNodeInfo nodeInfo = windowInfo.getRoot();
if (nodeInfo != null) {
private fun startBioAuth() {
val iris = BiometricAuthRequest(
BiometricApi.AUTO,
BiometricType.BIOMETRIC_IRIS,
BiometricConfirmation.ANY
)
val faceId = BiometricAuthRequest(
BiometricApi.AUTO,
BiometricType.BIOMETRIC_FACE,
BiometricConfirmation.ANY
File dir = Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_DOWNLOADS);
if (!dir.exists() && !dir.mkdirs()) {
dir = Environment.getExternalStorageDirectory();
if (!dir.exists() && !dir.mkdirs()) {
throw new IOException(dir.getName() + " permissions denied");
}
}
import android.content.Context;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
// Optimize APK size - remove excess files in the manifest and APK
packagingOptions {
//ignore strip tool for obsolete arch in 3rd-party libs
doNotStrip "*/armeabi/*.so"
doNotStrip "*/mips/*.so"
doNotStrip "*/mips64/*.so"
exclude "/META-INF/*.kotlin_module"
exclude "**/kotlin/**"
<iframe src="https://www.google.com/maps/d/embed?mid=1BXQVgjTdH7KQWS5ruhRP3OWuf0r3GAJR" width="640" height="480"></iframe>
<svg onload="init()" xmlns="http://www.w3.org/2000/svg"
aria-label="Calendar" role="img"
viewBox="0 0 512 512">
<script type="text/ecmascript"><![CDATA[
function getLang()
{
let found = [];
if (typeof navigator !== 'undefined') {
final String GROUP_ID = "my_group";
final String CHANNEL_ID = "my_channel";
//called in Application.onCreate()
private void init(){
if(Build.VERSION.SDK_INT >= 26)
{
NotificationManager notificationManager = getSystemService(NotificationManager.class);
protected static char[] iso8859_1map = "\u0402\u0403\u201a\u201e\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0459\u203a\u045a\u045c\u045b\u045f \u040e\u045e\u0408\u00a4\u0490\u00a6\u00a7\u0401\u00a9\u0404\u00ab\u00ac\u00ad\u00ae\u0407\u00b0Z\u00b1\u0406\u0456\u0491\u00b5\u00b6\u00b7\u0451\u2116\u0454\u00bb\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042c\u042b\u042a\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f".toCharArray();
protected static char[] cp1251map = "\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\