Skip to content

Instantly share code, notes, and snippets.

Optional Exit of T.Ono tonosaman

Block or report user

Report or block tonosaman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tonosaman
tonosaman / README.md
Last active Jul 31, 2019
Web2py sample application - SalesLog
View README.md

Setup

  1. Create new web application on Web2py

  2. replace below files

  • models/db.py
  • controllers/default.py
  • views/default/grid.html

Usage

Summary of contacts

@tonosaman
tonosaman / README.md
Last active Apr 25, 2019
Xvisor Development › [PATCH] CORE: blockdev: Fix stack frame corruption
View README.md

CORE: vmm_blockdev: Fix stack frame corruption

This patch fixes stack frame corruption caused by a race condition between issuer and worker on the request queue.

Patch

diff --git a/core/block/vmm_blockdev.c b/core/block/vmm_blockdev.c
index 0c8b488..d32d768 100644
@tonosaman
tonosaman / .gitignore
Last active Jul 19, 2018
vagrant + FreeBSD-11.2-STABLE + crochet RaspberryPi3 = clang 6.0.1(aarch64-unknown-freebsd11.2)
View .gitignore
crochet
ports
FreeBSD-11.2-STABLE
FreeBSD-ports
.vagrant
View extract-crud.sh
#!/bin/sh
DESTDIR=${1}
if [ "$#" -ne 1 ]; then
echo "USAGE: \n\t $0 \"/c/Hanshin/metalics-Rebuild/trunk/Source/Kikan/JC/BL/\""
exit
fi
# NOTE: Sorting order of underbar('_') is different between Linux and MINGW64.
# sort ./tbls.txt > tbls.txt.unix
# TBLS="./tbls.txt.unix"
@tonosaman
tonosaman / README.md
Last active Mar 9, 2017
Howto pick max VON MISES from NASTRAN output(.f06)
View README.md
$ cat q20170302-solid-shear.f06 | awk '
NR == 1, /S T R E S S E S   I N   H E X A H E D R O N   S O L I D   E L E M E N T S   \( H E X A \)/ { next }
BEGIN { print "VON MISES,GRID-ID,ELEMENT-ID" }
{ _eid = substr($0, 4, 8); _vm = substr($0, 114, 16) }
_eid ~ /^ *[0-9]+$/ { eid = _eid }
_vm ~ /^ *[0-9.E+-]+$/ { nid = substr($0, 16, 8); printf "%f,%d,%d\n", _vm, nid, eid }' | sort -nr | head -20
  • GRID-ID=0 means CENTER of ELEMENT
@tonosaman
tonosaman / README.md
Last active Mar 2, 2017
Femap BASIC Script: exports all AnalysisSet as .nas file
View README.md

カスタムツールへ登録して使用する方法

C:\FEMAPv1031J\api\にディレクトリを作成し、マクロファイルexport-Nastran-AnalysisSet.basを配置する。

(「カスタムツール>追加」で.basファイルを指定すると、Femapにより上記ディレクトリ配下にコピーされる。)

APIプログラムの編集方法

  1. Femapメニューより「ツール>プログラミング>APIプログラミング」を選択
  2. APIプログラミングウィンドウの上部の「開く」アイコンをクリック
  3. マクロファイルexport-Nastran-AnalysisSet.basを読込
  4. APIプログラミングウィンドウ上部の「実行」アイコンをクリック
@tonosaman
tonosaman / PathRenum.fs
Created Feb 9, 2017
Femap: sequentially numbering linear nodes and elements
View PathRenum.fs
module PathRenum
type FemapId = int
type ElemId = FemapId
type NodeId = FemapId
type NodeToElems = System.Collections.Generic.Dictionary<NodeId ref, List<ElemId ref>>
type ElemToNodes = System.Collections.Generic.Dictionary<ElemId ref, NodeId ref * NodeId ref>
// To import `femap.model`, we need to edit `.fsproj` by hand.
// @see F# Known Issue - 3. Cannot add a reference to a project in a Solution folder
@tonosaman
tonosaman / README.md
Last active Feb 26, 2017
RPi3 aarch64 u-boot with jtag
View README.md

u-boot with jtag enabler

based on ports/sysutils/u-boot-rpi3/@FreeBSD11.0-RELEASE-p1

diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index 19c771d..26e2266 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -57,6 +57,7 @@ reset:
@tonosaman
tonosaman / README.md
Last active Nov 12, 2016
NetBSD7.0でLLVM-3.9 をビルドしたい人の備忘録(3)
View README.md

NetBSD7.0でLLVM-3.9 をビルドしたい人の備忘録(3): _LIBCPP_HAS_ATOMIC_BUILTINS

ビルドした Clang for AArch64 target の atomicity を確認

LLVM Atomic Instructions and Concurrency Guide

/vagrant/freebsd/lib/libc++/../../contrib/libc++/src/include/atomic_support.h にて targetがアトミック性をサポートしているならば_LIBCPP_HAS_ATOMIC_BUILTINS が有効になる。

@tonosaman
tonosaman / MDIX-setting.md
Created Oct 24, 2016
ストレートEtherケーブル直結構成(with MDI-X)の備忘録
View MDIX-setting.md

Howto PC-to-PC direct connect with strait ether-cable.

MDI-X: HUB不要でストレート直結可能

片方でもNICがMDI-XをサポートしていればストレートEtherケーブルを繋いで通信可能。

+-----+  ether cable +--------+
| p70 |--------------| sh76en |
+-----+              +--------+
You can’t perform that action at this time.