View invariant_macro.rs
This file contains 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
// If `unsafe` and `nightly` are enabled, enable unstable `core_intrinsics` feature | |
// with #![feature(core_intrinsics)] (Nightly only). | |
macro_rules! invariant { | |
($expr: expr) => { | |
cfg_if::cfg_if! { | |
if #[cfg(all(feature = "unsafe", feature = "nightly"))] { | |
core::intrinsics::assume($expr); | |
} | |
else if #[cfg(feature = "unsafe")] { |
View .gdbinit
This file contains 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
set arch riscv:rv64 | |
define hook-quit | |
set confirm off | |
end | |
target extended-remote localhost:3333 |
View openocd-unmatched-u7.cfg
This file contains 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
adapter speed 10000 | |
adapter driver ftdi | |
ftdi_device_desc "Dual RS232-HS" | |
ftdi_vid_pid 0x0403 0x6010 | |
ftdi_layout_init 0x0008 0x001b | |
ftdi_layout_signal nSRST -oe 0x0020 -data 0x0020 | |
set _CHIPNAME riscv | |
transport select jtag |
View openocd-unmatched-s7.cfg
This file contains 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
adapter speed 10000 | |
adapter driver ftdi | |
ftdi_device_desc "Dual RS232-HS" | |
ftdi_vid_pid 0x0403 0x6010 | |
ftdi_layout_init 0x0008 0x001b | |
ftdi_layout_signal nSRST -oe 0x0020 -data 0x0020 | |
set _CHIPNAME riscv | |
transport select jtag |
View openocd-unmatched.cfg
This file contains 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
adapter speed 10000 | |
adapter driver ftdi | |
ftdi_device_desc "Dual RS232-HS" | |
ftdi_vid_pid 0x0403 0x6010 | |
ftdi_layout_init 0x0008 0x001b | |
ftdi_layout_signal nSRST -oe 0x0020 -data 0x0020 | |
set _CHIPNAME riscv | |
transport select jtag |
View 慧琳一切經音義-mapping-table.txt
This file contains 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
# | |
# | |
# 慧琳一切經音義 mapping table | |
# | |
# $1 : Volume (001-100) | |
# $2 : Leaf number [張] in the volume (two digits) | |
# $3 : Identifier for National Diet Library Digital Library | |
# xxxxxxx -> http://dl.ndl.go.jp/info:ndljp/pid/xxxxxxx | |
# $4 : Image number for National Diet Library Digital Library | |
# ppp -> http://dl.ndl.go.jp/info:ndljp/pid/xxxxxxx/ppp (removing trailing zeros is recommended) |
View naj-download-helper.user.js
This file contains 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
// ==UserScript== | |
// @name !NAJ: Download Helper | |
// @namespace http://a4lg.com/ | |
// @description Adds download control buttons | |
// @include https://www.digital.archives.go.jp/DAS/meta/listPhoto* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
var dtype = document.getElementById("download_type"); |
View tilejpeg.cpp
This file contains 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
/* | |
tilejpeg : lossless JPEG tiling program for non-optimized images | |
tilejpeg.cpp | |
Tile JPEG Program | |
Copyright (C) 2016 Tsukasa OI <floss_tilejpeg@irq.a4lg.com> | |
Based on the program code on <http://apostata.web.fc2.com/tilejpeg/index.html>. |
View nico-html5-disable-resume.js
This file contains 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
// ==UserScript== | |
// @name Disable resume feature on Nicovideo HTML5 player | |
// @description ニコニコ動画プレイヤー (HTML5) のレジューム機能を無効化 | |
// @namespace http://a4lg.com/ | |
// @version 1.1 | |
// @include http://www.nicovideo.jp/watch/* | |
// @author a4lg | |
// @license CC0 | |
// @run-at document-start | |
// ==/UserScript== |
View int_range.hpp
This file contains 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
/* | |
int_range.hpp | |
Integral range generator (for C++11/14) | |
Copyright(C) 2015 Tsukasa OI. | |
Permission to use, copy, modify, and/or distribute this software for | |
any purpose with or without fee is hereby granted, provided that the |
NewerOlder