Skip to content

Instantly share code, notes, and snippets.

Peter Cai PeterCxy

Block or report user

Report or block PeterCxy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@PeterCxy
PeterCxy / README.md
Last active Mar 10, 2019
Evdev long click to right click emulation
View README.md

A Python script to implement long-click-to-right-click emulation on Linux. Root permission needed (or you need udev rules to allow your user to write / read from evdev)

Usage:

python rce.py <name_of_your_tuchscreen>

Use xinput output to determine the name of your touchscreen

@PeterCxy
PeterCxy / main.rs
Created Mar 6, 2018
Brute force solution to the viral logic test
View main.rs
const A: usize = 0;
const B: usize = 1;
const C: usize = 2;
const D: usize = 3;
const Q2_SELECTIONS: [usize; 4] = [C, D, A, B];
const Q3_SELECTIONS: [usize; 4] = [3, 6, 2, 4];
const Q4_SELECTIONS: [(usize, usize); 4] = [
(1, 5), (2, 7), (1, 9), (6, 10)
];
const Q5_SELECTIONS: [usize; 4] = [8, 4, 9, 7];
View gist:452cef38e51521dda3b35df86f70a939
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <linux/netfilter_ipv4.h>
#include <unistd.h>
#define BUFFER_SIZE 1024
#define on_error(...) { fprintf(stderr, __VA_ARGS__); fflush(stderr); exit(1); }
@PeterCxy
PeterCxy / zeronet.conf
Created Oct 28, 2017
ZeroNet trackers
View zeronet.conf
[global]
trackers_file = /path/to/zeronet_trackers.txt
View keybase.md

Keybase proof

I hereby claim:

  • I am PeterCxy on github.
  • I am petercxy (https://keybase.io/petercxy) on keybase.
  • I have a public key whose fingerprint is 708D FB13 CBED 9AB3 9449 DBFB 41C0 4120 C297 B594

To claim this, I am signing this object:

View BlackLight Weico API Key
此API KEY为 Weico.Android 的API。复制后粘贴到BL的自定义API对话框的任意一个框框内即可(开头结尾不要带空格之类的,如果没反应,尝试将光标移到最后删除最后的不可见字符)
SSMjExMTYwNjc5OjoxZTZlMzNkYjA4ZjkxOTIzMDZjNGFmYTBhNjFhZDU2Yzo6aHR0cDovL29hdXRoLndlaWNvLmNjOjplbWFpbCxkaXJlY3RfbWVzc2FnZXNfcmVhZCxkaXJlY3RfbWVzc2FnZXNfd3JpdGUsZnJpZW5kc2hpcHNfZ3JvdXBzX3JlYWQsZnJpZW5kc2hpcHNfZ3JvdXBzX3dyaXRlLHN0YXR1c2VzX3RvX21lX3JlYWQsZm9sbG93X2FwcF9vZmZpY2lhbF9taWNyb2Jsb2csaW52aXRhdGlvbl93cml0ZTo6Y29tLmVpY28ud2VpY286OkVFEE
You can’t perform that action at this time.