Skip to content

Instantly share code, notes, and snippets.

View Mattosx's full-sized avatar

mattos Mattosx

  • Netease
  • Hangzhou
View GitHub Profile
@Mattosx
Mattosx / LICENSE
Created February 11, 2022 17:01 — forked from yamnikov-oleg/LICENSE
Shared (interprocess) mutexes on Linux
MIT License
Copyright (c) 2018 Oleg Yamnikov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Mattosx
Mattosx / nmap-scan-show-open.sh
Created January 24, 2021 12:20 — forked from gregjhogan/nmap-scan-show-open.sh
nmap scan for port open and only show open results
nmap -p <port> 192.168.0.*|grep -B3 open
# EXAMPLE OUTPUT
# ==============
# opening device 0xddcc
# connected
# tester present ...
# read data by id: boot software id ...
# 39990-TVA-A110
# read data by id: application software id ...
# 39990-TVA-A150
# read data by id: application data id ...
isolation.tools.getPtrLocation.disable = "TRUE"
isolation.tools.setPtrLocation.disable = "TRUE"
isolation.tools.setVersion.disable = "TRUE"
isolation.tools.getVersion.disable = "TRUE"
monitor_control.disable_directexec = "TRUE"
monitor_control.disable_chksimd = "TRUE"
monitor_control.disable_ntreloc = "TRUE"
monitor_control.disable_selfmod = "TRUE"
monitor_control.disable_reloc = "TRUE"
monitor_control.disable_btinout = "TRUE"
@Mattosx
Mattosx / .gitignore
Created March 8, 2019 11:13 — forked from FullStackForger/.gitignore
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/
@Mattosx
Mattosx / eventsim.py
Created September 17, 2018 07:13 — forked from damonjw/LICENSE
Event driven simulator in Python, using async/await
import heapq
import asyncio
class EventSimulator(asyncio.AbstractEventLoop):
'''A simple event-driven simulator, using async/await'''
def __init__(self):
self._time = 0
self._running = False
self._immediate = []
@Mattosx
Mattosx / tfo.c
Created September 13, 2018 09:31 — forked from linusyang/tfo.c
// x86_64-w64-mingw32-gcc tfo.c -o tfo -lws2_32 -static -g -O0
#define TARGET_URL "localhost"
#define TARGET_PORT 8000
#ifndef _WINSOCK_H
#define _WINSOCK_H
#ifdef __MINGW32__
@Mattosx
Mattosx / rbtree.c
Created July 1, 2016 14:16 — forked from hoohack/rbtree.c
Red Black Implement
#include "rbtree.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
RBTree *rbtree_init(int (*rbt_keycmp)(void *, void *))
{
RBTree *tree = malloc(sizeof(RBTree));
if (tree == NULL) {
printf("malloc tree failed\n");