ASAHIネットがDS-Lite対応したので、 自宅の適当なLinuxルーターにて設定しようとして詰まったAFTR取得に関するメモ。
Linuxルーターを使ってる人向けのニッチなものだけど、情報として残しておく。
<details open markdown="block"> | |
<summary>Table of contents</summary> | |
<ul> | |
<li> | |
<a href="#services">Services</a> | |
<ul> | |
{{- range .Files}}{{range .Services}} | |
<li><a href="#{{.FullName | lower | replace "." ""}}">{{.LongName}} (<code>{{.FullName}}</code>)</a></li> | |
{{- end}}{{end}} | |
</ul> |
use anyhow::{anyhow, Result}; | |
use std::io::Write; | |
// MIT: Atanas Yankov <[email protected]> | |
// https://github.com/atanunq/viuer/blob/3b99255f0d1586dd5b8cb1d409fa8515d9e77493/Cargo.toml#L10 | |
// https://github.com/atanunq/viuer/blob/3b99255f0d1586dd5b8cb1d409fa8515d9e77493/src/printer/sixel.rs#L23 | |
pub fn render_image(image: &image::DynamicImage) -> Result<()> { | |
let image = image.resize(128, 128, image::imageops::Nearest); | |
let encoder = sixel::encoder::Encoder::new() | |
.map_err(|e| anyhow!("failed to create a sixel encoder: {:?}", e))?; |
#!/bin/bash | |
# | |
# Usage: | |
# | |
# download-gh-release {user}/{repo} {file} [{tag}] | |
# | |
repo=$1 | |
file=$2 | |
tag=${3:-latest} |
const tagPattern = /\*(.+)\(\)\*/; | |
function* parse(content: string): Generator<{ fn: string, args: string[] }> { | |
const lines = content.split("\n"); | |
const founds = lines.flatMap((v, i) => { | |
const m = v.match(tagPattern); | |
if (!m) { | |
return []; | |
} | |
const index = i; |
ASAHIネットがDS-Lite対応したので、 自宅の適当なLinuxルーターにて設定しようとして詰まったAFTR取得に関するメモ。
Linuxルーターを使ってる人向けのニッチなものだけど、情報として残しておく。
import ctypes | |
from contextlib import contextmanager, ExitStack | |
from ctypes import byref, sizeof, Structure, POINTER | |
from ctypes import wintypes | |
# Alias | |
windll = ctypes.windll # type: ignore | |
WinError = ctypes.WinError # type: ignore | |
SIZE_T = ctypes.c_size_t | |
TRUE = 1 |
let s:Promise = vital#fern#import('Async.Promise') | |
let s:AsyncLambda = vital#fern#import('Async.Lambda') | |
let s:root = { | |
\ 'name': 'TabPages', | |
\ 'status': 1, | |
\ '_kind': 'root', | |
\} | |
function! fern#scheme#tabpage#provider#new() abort |
Creating benchmark environment ... | |
Benchmarking 'ls' ... | |
0.003170 | |
Benchmarking 'find' ... | |
0.001505 | |
Benchmarking 'vim_glob' ... | |
1.894150 |
#!/usr/bin/env python | |
import re | |
import time | |
from typing import Iterator, Tuple, Optional | |
import requests | |
# ================================================================ | |
TOKEN = "****************************************" | |
USER = "username" |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Color Space</key> | |
<string>sRGB</string> | |
<key>Blue Component</key> | |
<real>0.12941176470588237</real> |