Skip to content

Instantly share code, notes, and snippets.

@LionZXY
LionZXY / 123.kt
Last active September 1, 2017 07:49 — forked from 1ou/123
Help
package com.skubyev.guesstherace.repositories.images
import com.skubyev.guesstherace.model.ModelWrapper
import com.skubyev.guesstherace.model.data.Cache
import com.skubyev.guesstherace.model.data.Image
import com.skubyev.guesstherace.model.mapper.ImagesMapper
import com.skubyev.guesstherace.model.network.api.images.ImagesApi
import com.skubyev.guesstherace.model.storage.PersistentDatabase
import com.skubyev.guesstherace.utils.ext.subscribeIgnoreResult
import com.skubyev.guesstherace.utils.ext.transitSuccessToEmitter
@LionZXY
LionZXY / pip.md
Created November 8, 2019 16:03 — forked from saurabhshri/pip.md
Install and use pip in a local directory without root/sudo access.

Install and use pip in a local directory without root/sudo access.

Why?

Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

How?

#!/usr/bin/env python3
import hashlib
import os
import traceback
import json
import time
def remove_prefix(text, prefix):
@LionZXY
LionZXY / amiibin2nfcdev.py
Created December 14, 2021 14:04 — forked from yobabyte/amiibin2nfcdev.py
Script for converting NTAG215 dumps (.bin) to Flipper NFC device files (.nfc)
#!/usr/bin/env python
import sys
from os.path import splitext, basename
if len(sys.argv) < 2:
sys.exit('Usage: %s dump.bin' % sys.argv[0])
ntag_file = sys.argv[1]
nfc_file = splitext(ntag_file)[0] + '.nfc'
public class BleCommandExecutor implements CommandExecutor {
private final BleDevice bleDevice;
private final Executor executor = Executors.newSingleThreadExecutor();
private final Map<String, Queue<CommandCallback<String>>> callbacks = new ConcurrentHashMap<>();
public BleCommandExecutor(BleDevice bleDevice) {
this.bleDevice = bleDevice;
}
@Override