cd Downloads
adb shell pm list packages -f | grep gnuroot
adb pull /data/app/com.gnuroot.debian-1/base.apk com.gnuroot.debian.apk
adb install com.gnuroot.debian.apk
curl -O https://github.com/corbinlc/GNURootDebian/blob/master/GNURootDebianSource/src/armhf/obb/main.10.com.gnuroot.debian.obb?raw=true
adb shell mkdir -p /sdcard/Android/obb/com.gnuroot.debian
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
export TARGET_VERTX_VERSION='3.2.1' | |
cd $HOME | |
curl -L -O https://bintray.com/artifact/download/vertx/downloads/vert.x-$TARGET_VERTX_VERSION.tar.gz | |
tar zxvf vert.x-$TARGET_VERTX_VERSION.tar.gz | |
rm vert.x-$TARGET_VERTX_VERSION.tar.gz | |
export PATH=$HOME/vertx/bin:$PATH | |
echo 'Ready for running!' | |
vertx --version |
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 activity; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.provider.Browser; | |
import android.support.v7.app.AppCompatActivity; | |
import BuildConfig; | |
import R; |
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
# python3 bots.py localhost 8080 100 4 1 | |
import random | |
import select | |
import socket | |
import sys | |
import time | |
from datetime import datetime | |
eventmask = select.POLLIN | select.POLLPRI | select.POLLHUP | select.POLLERR |
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
using Messengers.Udp; | |
using System.Net; | |
using System.Threading; | |
using UnityEngine; | |
namespace UdpExample.Client | |
{ | |
public class DevServer : MonoBehaviour | |
{ | |
public Messenger Messenger; |
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 csv | |
from easydict import EasyDict | |
default_reader = csv.DictReader | |
def load_tsv(path, reader=default_reader): | |
return load_csv(path, delimiter='\t', reader=reader) |
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 json | |
import re | |
import sys | |
def repl(match): | |
return ':"{0}"{1}'.format( | |
match.group(1), | |
match.group(2)) | |
text = re.sub(r':([0-9A-Za-z]+)([,}])', repl, sys.stdin.readline()) |
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
sudo apt-get -y install libopencv-dev python-opencv |
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/env python | |
# -*- coding: utf-8 -*- | |
from cvwrapper import AndroidAgent, Image | |
# Create agent | |
agent = AndroidAgent() | |
# Capture image | |
image = agent.capture() |
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 redis | |
import time | |
def snowflake(redis, epoch=0): | |
return redis.register_script(f""" | |
local node = tonumber(redis.call('HGET', 'globals', 'node')) % 1024 | |
local seq = tonumber(redis.call('HINCRBY', 'globals', 'sequence', 1)) % 4096 | |
local time = redis.call('TIME') | |
local time41 = ((tonumber(time[1]) * 1000) + (tonumber(time[2]) / 1000)) - {epoch} |
OlderNewer