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/bash | |
set -eo pipefail | |
if [[ $1 =~ (-h|--help) ]]; then | |
echo "Usage: $0 [file on mounted drive]" | |
exit 1 | |
fi | |
tmpfile=${1:-$(mktemp)} | |
echo "I/O with $tmpfile will be performed..." |
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 { isMainThread, Worker, workerData } from "node:worker_threads"; | |
import { connectAsync } from "mqtt"; | |
import { once } from "node:events"; | |
const WORKER_COUNT = 100; | |
const MSG_PER_WORKER = 500; | |
const LISTENER_QOS = 1; | |
const FLOODER_QOS = 1; | |
async function runFloodWorker() { |
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
#include <stdio.h> | |
#include "stm32g0xx_hal.h" | |
static TIM_HandleTypeDef tim; | |
static DMA_HandleTypeDef tim_dma; | |
static UART_HandleTypeDef uart; | |
UART_HandleTypeDef *_write_uart_handle = &uart; // for syscall.c | |
#define NEC_LEN 64 |
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
local api = vim.api | |
local queries = { | |
lua = { | |
comment = "-- ", | |
queries = { | |
[[ | |
(function_declaration name: (identifier) @name) @body | |
]], | |
[[ |
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 sys | |
from asyncio import open_connection, run | |
import aiofiles | |
async def main(args): | |
reader, writer = await open_connection(port=8080) | |
if len(args) >= 2 and args[0] == "--send": | |
writer.write(b"send\n") |
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 { useRef, useState, useEffect, createContext, useContext } from 'react'; | |
type ExecuteResponse = { key: string; response: string }; | |
type HCaptchaContext = { | |
widgetId: string | undefined; | |
setWid(wId: string | undefined): void; | |
loading: boolean; | |
getToken(): Promise<string>; | |
setExecutePending(v: boolean): void; | |
}; |
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
#include <assert.h> | |
#include <curl/curl.h> | |
#include <json.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
static const char *API_URL = "https://api.telegram.org"; | |
struct response { |
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 emoji | |
import gzip | |
from io import BytesIO | |
import json | |
import logging | |
from pyrogram import filters, types | |
from pyrogram.raw.functions.messages import GetStickerSet | |
from pyrogram.raw.functions.upload import GetFile | |
from pyrogram.raw.types import ( |
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
#include <assert.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <getopt.h> | |
#include <linux/input-event-codes.h> | |
#include <poll.h> | |
#include <signal.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
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
#include <assert.h> | |
#include <fcntl.h> /* For O_* constants */ | |
#include <signal.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> /* For mode constants */ | |
#include <unistd.h> | |
#include <wayland-client.h> |
NewerOlder