This file contains hidden or 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
diff --git a/components/tcp_transport/transport_tcp.c b/components/tcp_transport/transport_tcp.c | |
index 5bfb99dd..cdae5bf0 100644 | |
--- a/components/tcp_transport/transport_tcp.c | |
+++ b/components/tcp_transport/transport_tcp.c | |
@@ -32,60 +32,51 @@ typedef struct { | |
int sock; | |
} transport_tcp_t; | |
-static int resolve_dns(const char *host, struct sockaddr_in *ip) { | |
- |
This file contains hidden or 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
<html> | |
<head> | |
<title>信用取引計算くん</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | |
</head> | |
<body> | |
<div id="page-content" class="card"> | |
<h1 class="card-header"><i class="bi bi-calculator"></i>信用取引計算くん</h1> |
This file contains hidden or 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
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d)) | |
OBJS=$(subst .cpp,.o,$(call rwildcard,,*.cpp)) | |
BINS=$(subst .cpp,,$(call rwildcard,,*.cpp)) | |
HEADERS=$(call rwildcard,,*.h) | |
CXXFLAGS ?= -std=c++2a | |
all: $(BINS) | |
libproj.a: $(OBJS) |
This file contains hidden or 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/python3 | |
import os,argparse,glob | |
import xxhash | |
def calc_hash_from_file_handle(f): | |
h = xxhash.xxh64() | |
bufsize = h.block_size * 0x800 | |
data = f.read(bufsize) | |
while data: | |
h.update(data) |
This file contains hidden or 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
/** | |
* ICMPv6 echo request (ping6) test | |
*/ | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <netinet/icmp6.h> |
This file contains hidden or 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/python | |
import argparse,ipaddress,subprocess,re | |
import qrcode | |
def generate_privkey(): | |
return subprocess.check_output(["wg","genkey"]).decode("UTF-8").strip() | |
def get_pubkey(privkey): | |
return subprocess.check_output(["wg","pubkey"], input=privkey.encode("UTF-8")).decode("UTF-8").strip() |
This file contains hidden or 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 <errno.h> | |
#include <poll.h> | |
#include <unistd.h> | |
#include <pty.h> | |
#include <fcntl.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <sys/un.h> | |
#include <stdexcept> | |
#include <iostream> |
This file contains hidden or 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
/* | |
MIT License | |
Copyright (c) Tomoatsu Shimada 2024 | |
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 |
This file contains hidden or 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
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c 2020-07-23 13:58:14.392337637 +0900 | |
+++ a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c 2020-08-02 12:26:10.677578297 +0900 | |
@@ -775,14 +775,15 @@ | |
tmp_str++; | |
while (isspace(*++tmp_str)); | |
- while (tmp_str[0]) { | |
- sub_str = strsep(&tmp_str, delimiter); | |
+ while (tmp_str[0] && (sub_str = strsep(&tmp_str, delimiter)) != NULL) { | |
ret = kstrtol(sub_str, 0, ¶meter[parameter_size]); |
This file contains hidden or 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/sh | |
if [ "$#" -eq 0 ] ; then | |
echo "Usage: $0 file" 1>&2 | |
exit 1 | |
fi | |
if [ ! -e $1 ];then | |
echo 9223372036854775807 | |
exit 1 | |
fi |