Skip to content

Instantly share code, notes, and snippets.

View lo48576's full-sized avatar
✔️
activated

YOSHIOKA Takuma lo48576

✔️
activated
View GitHub Profile
@lo48576
lo48576 / iri.rs
Last active August 28, 2017 10:51
IRI in Rust
//! IRI types.
// This implementation is based on `str`, `String`, `std::str` and `std::path`
// on rust-1.19.0 .
// See:
//
// * https://github.com/rust-lang/rust/blob/1.19.0/src/libcore/str/mod.rs
// * https://github.com/rust-lang/rust/blob/1.19.0/src/libcollections/string.rs
// * https://github.com/rust-lang/rust/blob/1.19.0/src/libstd/path.rs
use std::borrow::{Borrow, ToOwned, Cow};
ファイルシステム データ源 ファイルを読むとき返ってくる値 ファイルに書くとき起きること

ext4

バイナリデータ

バイナリデータの適当な場所からデータを拾ってきて返す

バイナリデータの適当な場所にデータを書く、ジャーナルを書く、場合によっては領域確保のため管理領域に変更を加える

sshfs

SSH でログインできるリモートユーザ

ssh 経由でデータを読んだとき読まれる値

ssh 経由でデータを書き込む

@lo48576
lo48576 / ftdetect__ssh_known_hosts.vim
Last active January 18, 2023 10:43
Vim syntax highlight for `~/.ssh/known_hosts`
au BufRead,BufNewFile known_hosts,ssh_known_hosts set filetype=ssh_known_hosts
@lo48576
lo48576 / config-cwm
Last active June 26, 2017 09:44
かーねるこんふぃぐ生成
# Desktop.
#
# Basic settings (common)
#
# See https://wiki.gentoo.org/wiki/Kernel/Configuration .
# Modules.
## config FIRMWARE_IN_KERNEL
## bool "Include in-kernel firmware blobs in kernel binary"
FIRMWARE_IN_KERNEL=y
## menuconfig MODULES
@lo48576
lo48576 / binary-parser-simple.rs
Created November 18, 2016 14:44
fbxcelのテストコード
extern crate env_logger;
extern crate fbxcel;
use std::fs::File;
use std::io::BufReader;
use std::path::Path;
#[test]
fn test_binary_parser() {
@lo48576
lo48576 / rrysnc.sh
Last active August 6, 2018 04:49
[unmaintained, NOT SAFE] rrsync replacement without perl, useful for limited environment like CoreOS
#!/bin/sh
# Copyright (C) 2004 Joe Smith <js-cgi@inwap.com>
# Copyright (C) 2004-2015 Wayne Davison <wayned@samba.org>
# Copyright (C) 2016-2018 YOSHIOKA Takuma <tashioka.256@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@lo48576
lo48576 / 20160620_sfcdetails_partial.txt
Created June 20, 2016 05:25
Linux hostのVirtualBox内でのWindows10ゲストでDirectX関連エラーが出る件
...
2016-06-20 13:31:37, Info CSI 000014b1 [SR] Beginning Verify and Repair transaction
2016-06-20 13:31:39, Info CSI 000014b3 [SR] Cannot repair member file [l:8]"d3d9.dll" of Microsoft-Windows-DirectX-Direct3D9, version 10.0.10586.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2016-06-20 13:31:41, Info CSI 000014b9 [SR] Cannot repair member file [l:8]"d3d9.dll" of Microsoft-Windows-DirectX-Direct3D9, version 10.0.10586.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2016-06-20 13:31:41, Info CSI 000014ba [SR] This component was referenced by [l:169]"Microsoft-Windows-Client-Features-Package-AutoMerged-windows~31bf3856ad364e35~amd64~~10.0.10586.0.Microsoft-Windows-Client-Features-Package-AutoMerged-windows-Deployment"
2016-06-20 13:31:41, Info CSI 000014bd [SR] Could not reproject corrupted file [l:23 ml:24]"\??\C:\WINDOWS\System32"\[l:8]"d3d9.d
@lo48576
lo48576 / dedup_paren.vim
Last active January 27, 2016 06:31
ignore input for duplicate closing paren/brace/brackets.
function! InsDedupParen(closer)
let cur_ch = getline('.')[col('.')-1]
let parenRList = ["}", ")", "]", "\"", "\'"]
let paren_index = index(parenRList, cur_ch)
if paren_index >= 0 && parenRList[paren_index] == a:closer
return "\<C-O>a"
endif
return a:closer
endfunction
@lo48576
lo48576 / init.vim
Last active January 23, 2016 10:44
NeoBundle (2016/01/23 19:18, commit 7597065) で発生する問題の再現
" how to reproduce problem:
" 1. `:SCCompile`
" (message "SingleCompile: Current buffer's filetype is not specified." printed.)
" 2. `:SCCompileRun` right after it.
" (shown messages are below:)
" Error detected while processing function neobundle#autoload#_command:
" line 17:
" E464: Ambiguous use of user-defined command: SCCompileRun
@lo48576
lo48576 / asciidoctor-enviroment.md
Last active December 3, 2015 09:44
asciidoctor environment at 2015-12-03
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]

$ gem -v
2.4.8

$ asciidoctor -v
Asciidoctor 1.5.3 [http://asciidoctor.org]
Runtime Environment (ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)