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 socket | |
STATUS_RESPONSE_HEADER = b'\xff\xff\xff\xffstatusResponse\n' | |
def parse_server_vars(server_vars): | |
if not server_vars.startswith(b'\\'): | |
raise ValueError('Invalid server vars') | |
values = server_vars.split(b'\\')[1:] | |
return dict(zip(values[::2], values[1::2])) |
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/local/bin/teleport -- gen_context(system_u:object_r:teleport_exec_t,s0) | |
/var/lib/teleport(/.*)? gen_context(system_u:object_r:teleport_var_lib_t,s0) | |
/var/run/teleport.pid -- gen_context(system_u:object_r:teleport_var_run_t,s0) | |
/run/teleport.pid -- gen_context(system_u:object_r:teleport_var_run_t,s0) |
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 main | |
import ( | |
"fmt" | |
"io" | |
"net" | |
"net/http" | |
"syscall" | |
) |
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
cmake_minimum_required(VERSION 3.6) | |
project(CORE) | |
find_program(BASH bash HINTS /bin) | |
find_package(ZLIB) | |
if(NOT DEFINED BPFTOOL_PATH) | |
set(BPFTOOL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/bin/bpftool") | |
endif() |
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
-module(echo_server). | |
-export([start/0, loop/2]). | |
-define(LISTEN_PORT, 1234). | |
start() -> | |
listen(). | |
listen() -> | |
{ok, LSock} = gen_tcp:listen(?LISTEN_PORT, [binary, {active, false}, | |
{reuseaddr, true}]), |
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
$ ./test | |
1.0 | |
0.1000 | |
0.112 | |
0.112 | |
2652 49490604 |
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 python3 | |
import argparse | |
import time | |
import logging | |
import psutil | |
FILENAME_FORMAT = "/sys/devices/system/cpu/cpu{0:d}/power/pm_qos_resume_latency_us" | |
logger = logging.getLogger(__name__) |
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 cv2 | |
import numpy as np | |
import argparse | |
from collections import namedtuple | |
import time | |
def draw_rotated_rect(image, rect, color=(0, 255, 0), thickness=1): | |
vertices = np.round(rect.points()).astype(int) |
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 python3 | |
import os | |
import sys | |
import time | |
import fcntl | |
import socket | |
import signal | |
import argparse | |
import subprocess | |
import struct |
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
Section "ServerLayout" | |
Identifier "X.org Configured" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Mouse0" "CorePointer" | |
InputDevice "Keyboard0" "CoreKeyboard" | |
EndSection | |
Section "Files" | |
ModulePath "/usr/lib/xorg/modules" | |
FontPath "/usr/share/fonts/X11/misc" |
NewerOlder