Keybase proof
I hereby claim:
- I am lambdalisue on github.
- I am lambdalisue (https://keybase.io/lambdalisue) on keybase.
- I have a public key ASBZIH_RGffOoVv_5tfnY5LlFQR3vfTF19AiLk2543RStAo
To claim this, I am signing this object:
javascript:(function() { | |
const t = document.querySelector('.c-MainLayout_Content article div'); | |
t.style.maxWidth = "none"; | |
t.style.width = "99%"; | |
}()) |
check() { | |
# -z: True when the string length is 0 | |
if [ -z $DUMMY ]; then | |
echo '-z $DUMMY' | |
fi | |
if [ -z "$DUMMY" ]; then | |
echo '-z "$DUMMY"' | |
fi | |
if [ -z "${DUMMY+xxx}" ]; then | |
echo '-z "${DUMMY+xxx}"' |
I hereby claim:
To claim this, I am signing this object:
<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 <atanas.yankov98@gmail.com> | |
// 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 |