$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices server.c -o server
$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices client.c -o client
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
widthheight=$(wm size | sed "s/.* //") | |
width=$(($(echo $widthheight | sed "s/x.*//g" )+0)) | |
height=$(($(echo $widthheight | sed "s/.*x//g" )+0)) | |
GetColorAtPixel () { | |
x=$1;y=$2; | |
rm ./screen.dump 2> /dev/null | |
screencap screen.dump | |
screenshot_size=$(($(wc -c < ./screen.dump)+0)); | |
buffer_size=$(($screenshot_size/($width*height))) | |
let offset=$width*$y+$x+3 |
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
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <dlfcn.h> | |
int main(int argc, char** argv) | |
{ | |
void *handle; | |
void (*func_print_name)(const char*); |
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
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/device.h> | |
#include <linux/init.h> | |
#include <linux/fs.h> | |
#include <linux/mm.h> | |
#include <asm/uaccess.h> | |
#define MAX_SIZE (PAGE_SIZE * 2) /* max size mmaped to userspace */ | |
#define DEVICE_NAME "mchar" |
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
''' | |
Using Correlation Trackers in Dlib, you can track any object in a video stream without needing to train a custom object detector. | |
Check out the tutorial at: http://www.codesofinterest.com/2018/02/track-any-object-in-video-with-dlib.html | |
''' | |
import numpy as np | |
import cv2 | |
import dlib | |
# this variable will hold the coordinates of the mouse click events. | |
mousePoints = [] |