自分向けのメモ
%s/GATT Characteristic and Object Type//g
%s/GATT Service//g
use std::os::raw::{c_int, c_char}; | |
use std::ffi::{CStr, CString, c_void}; | |
use std::ptr::null; | |
use std::thread::spawn; | |
const RTLD_LAZY: c_int = 0x00001; | |
extern "C" { | |
fn dlopen(filename: *const c_char, flag: c_int) -> *const c_void; | |
fn dlclose(handle: *const c_void) -> c_int; |
CC = clang | |
CFLAGS = --target=wasm32-wasi --sysroot=/opt/wasi-sdk/wasi-sysroot -nostartfiles -Wl,--no-entry | |
.PHONY: all | |
all: run | |
.PHONY: run | |
run: a.mod.wasm | |
deno run --allow-read $(CURDIR)/run.ts |
0 0 0 Uint8Array(0) [] | |
1 0 0 Uint8Array(0) [] | |
2 0 0 Uint8Array(0) [] | |
3 0 0 Uint8Array(0) [] | |
4 2 4 Uint8Array(4) [ 240, 159, 146, 169 ] 💩 | |
5 3 5 Uint8Array(5) [ 240, 159, 146, 169, 97 ] 💩a | |
6 3 5 Uint8Array(5) [ 240, 159, 146, 169, 97 ] 💩a | |
7 3 5 Uint8Array(5) [ 240, 159, 146, 169, 97 ] 💩a | |
8 4 8 Uint8Array(8) [ 240, 159, 146, 169, 97, 230, 151, 165 ] 💩a日 | |
9 4 8 Uint8Array(8) [ 240, 159, 146, 169, 97, 230, 151, 165 ] 💩a日 |
# ... | |
# https://git-scm.com/book/ja/v2/Git%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC-Smart-HTTP | |
SetEnv GIT_PROJECT_ROOT /opt/git | |
SetEnv GIT_HTTP_EXPORT_ALL | |
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ | |
#RewriteEngine On | |
#RewriteCond %{QUERY_STRING} service=git-receive-pack [OR] | |
#RewriteCond %{REQUEST_URI} /git-receive-pack$ | |
#RewriteRule ^/git/ - [E=AUTHREQUIRED] |
import java.lang.invoke.MethodType; | |
import jdk.incubator.foreign.CLinker; | |
import jdk.incubator.foreign.FunctionDescriptor; | |
import jdk.incubator.foreign.LibraryLookup; | |
import jdk.incubator.foreign.MemoryAddress; | |
// run with `java --add-modules jdk.incubator.foreign -Dforeign.restricted=permit Main.java` | |
// | |
// TODO |
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.Channels; | |
import com.sun.net.httpserver.HttpExchange; | |
import com.sun.net.httpserver.HttpHandler; | |
import com.sun.net.httpserver.HttpServer; | |
public class Echo implements HttpHandler { |
[package] | |
name = "pipeterminal" | |
version = "0.1.0" | |
authors = ["yskszk63 <yskszk63@gmail.com>"] | |
edition = "2018" | |
license = "MIT or Apache-2.0" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] |
220 SG ESMTP service ready at ismtpd0008p1hnd1.sendgrid.net | |
[EHLO] | |
250-smtp.sendgrid.net | |
250-8BITMIME | |
250-PIPELINING | |
250-SIZE 31457280 | |
250-STARTTLS | |
250-AUTH PLAIN LOGIN | |
250 AUTH=PLAIN LOGIN |
#!/usr/bin/env python3 | |
import os | |
from smtplib import SMTP | |
from email.message import EmailMessage | |
def main(): | |
api_key = os.environ['api_key'] | |
# my addr -> spam, 'uso@dummy.ko' -> not spam |