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
/* | |
* packet-adb.c | |
* | |
* Routines for Android Debug Bridge (ADB) protocol dissection | |
* Author: Geir Sporsheim <geir.sporsheim@gmail.com> | |
*/ | |
#ifdef HAVE_CONFIG_H | |
#include "config.h" | |
#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
class CacheCallable(object): | |
"""Callable that cache results based on given arguments | |
""" | |
def __init__(self, func): | |
self.func = func | |
self.cache = {} | |
def __call__(self, *args): | |
try: | |
return self.cache[args] |
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 time | |
from twisted.python import failure | |
from twisted.internet import reactor, defer, task | |
from twisted.internet.protocol import Protocol | |
# Define some messages for our protocol | |
MSG_REQUEST = '>' | |
MSG_REQ_ACK = ':' | |
MSG_REQ_SUCCEEDED = '=' |
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
FROM silkeh/clang:14 as build | |
WORKDIR /app | |
COPY . . | |
RUN mkdir dist | |
RUN ./build.sh | |
FROM nginx:1.23.1 | |
COPY --from=build /app /usr/share/nginx/html |
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
#!/bin/bash | |
# Execute git fetch | |
git fetch & | |
# Get the pid of the `git fetch` process | |
pid=$! | |
# Characters used for the spinner animation | |
spin='⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏' |
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
from adb import protocol | |
data = ( | |
'\x4f\x50\x45\x4e\x02\x00\x00\x00' | |
'\x00\x00\x00\x00\x09\x00\x00\x00' | |
'\x31\x03\x00\x00\xb0\xaf\xba\xb1' | |
'\x73\x68\x65\x6c\x6c\x3a\x6c\x73' | |
'\x00' | |
) |
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
application: soft3dge | |
version: 0 | |
runtime: go | |
api_version: go1 | |
handlers: | |
- url: / | |
script: _go_app |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Astigmatism eye test</title> | |
<style> | |
canvas { | |
position: fixed; | |
top: 0; |
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
from twisted.internet.protocol import Protocol | |
import re | |
class ShellProtocol(Protocol): | |
"""Define a generic shell-like protocol: | |
[login-prompt [input-echo]] | |
[password-prompt] [input-echo]] | |
[greeting] | |
[prompt] | |
[input-echo] |
NewerOlder