Skip to content

Instantly share code, notes, and snippets.

@demixdn
demixdn / passw-gen.dart
Created October 8, 2024 06:38
Pseudo passw generator. Use your set of symbols as 'source' param.
import 'dart:math';
void main() {
print(generate('qwertyuiop1234567890'));
}
String generate(String source, [int rLength = 15]){
final l = source.length;
final extra = '1234567890qwertyuiopasdfghjklzxcvbnm!#*()-=+<>?plmoknijbuhvygctfxrdzesawq0192837465'.split('').toList()..shuffle();
final extraS = extra.take(5).join();
@demixdn
demixdn / SystemUiHelper.java
Created October 24, 2019 10:53 — forked from chrisbanes/SystemUiHelper.java
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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
@demixdn
demixdn / gist:527367fedba8b9e11c4c74bb0d7c4db9
Created April 11, 2019 14:52 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActivity implements Messenger {
@demixdn
demixdn / BlankFragment.java
Last active January 19, 2018 13:15
Простая организация асинхронной работы (Callback + Runnable + Executor)
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.concurrent.Executor;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.AppCompatActivity;
import android.util.SparseArray;
import android.view.View;
import android.view.Window;
@demixdn
demixdn / SimpleTextWatcher.java
Created May 25, 2017 12:58
Simple TextWatcher for EditText
import android.text.Editable;
import android.text.TextWatcher;
/**
* @author Aleks Sander
*/
public abstract class SimpleTextWatcher implements TextWatcher {
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.io.UnsupportedEncodingException;
import java.util.Properties;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
@demixdn
demixdn / SimpleAdapter.java
Created April 24, 2017 15:50
Simple Recycler Adapter with generics
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
/**
@demixdn
demixdn / EditTextDebounce.java
Created April 24, 2017 09:58
Get text from EditText with debounce without RxJava
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
import java.lang.ref.WeakReference;