Skip to content

Instantly share code, notes, and snippets.

@a4lg
a4lg / .gdbinit
Last active Jun 3, 2021
GDB initialization file I am using for JTAG-based debugging
View .gdbinit
set arch riscv:rv64
define hook-quit
set confirm off
end
target extended-remote localhost:3333
@a4lg
a4lg / openocd-unmatched-u7.cfg
Last active Jun 14, 2021
HiFive Unmatched + OpenOCD configuration (four U74 cores only; no flash configured)
View openocd-unmatched-u7.cfg
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
@a4lg
a4lg / openocd-unmatched-s7.cfg
Last active Jun 3, 2021
HiFive Unmatched + OpenOCD configuration (one S7 core only; no flash configured)
View openocd-unmatched-s7.cfg
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
@a4lg
a4lg / openocd-unmatched.cfg
Last active Jul 17, 2021
HiFive Unmatched + OpenOCD configuration (S7+U7 cores; no flash configured)
View openocd-unmatched.cfg
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
#
#
# 慧琳一切經音義 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
// ==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");
@a4lg
a4lg / tilejpeg.cpp
Last active Dec 27, 2016
Lossless JPEG tiling program for non-optimized images
View tilejpeg.cpp
/*
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>.
@a4lg
a4lg / nico-html5-disable-resume.js
Last active Jan 6, 2017
Greasemonkey/Tampermonkey 用ニコニコ動画プレイヤー (HTML5) のレジューム機能を無効化するスクリプト
View nico-html5-disable-resume.js
// ==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==
@a4lg
a4lg / int_range.hpp
Last active Aug 29, 2015
Change iterator type to input iterator, make dereference operator to return value again
View int_range.hpp
/*
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
@a4lg
a4lg / rufus.loc
Created May 12, 2015
Rufus 2.1 Japanese Fix
View rufus.loc
l "en-US" "English (English)" 0x0409, 0x0809, 0x0c09, 0x1009, 0x1409, 0x1809, 0x1c09, 0x2009, 0x2409, 0x2809, 0x2c09, 0x3009, 0x3409, 0x3809, 0x3c09, 0x4009, 0x4409, 0x4809
v 1.0.17
t MSG_001 "Other instance detected"
t MSG_002 "Another Rufus application is running.\n"
"Please close the first application before running another one."
t MSG_003 "WARNING: ALL DATA ON DEVICE '%s' WILL BE DESTROYED.\n"
"To continue with this operation, click OK. To quit click CANCEL."
t MSG_004 "Rufus update policy"
t MSG_005 "Do you want to allow Rufus to check for application updates online?"
t MSG_006 "Close"