Skip to content

Instantly share code, notes, and snippets.

Avatar

Masanori Ogino omasanori

  • Japan, or anywhere else
View GitHub Profile
@omasanori
omasanori / README.md
Last active Sep 30, 2020
Notes on Don Quijote MUGA Stoic PC3, a Japanese (approx.) 200 USD low-end laptop PC
View README.md

Don Quijote MUGA Stoic PC3

無我muga
the Buddhist doctrine of non-self, meaning that eternal and invariant self, or soul, is illusory
View keybase.md

Keybase proof

I hereby claim:

  • I am omasanori on github.
  • I am omasanori (https://keybase.io/omasanori) on keybase.
  • I have a public key ASC_x_1I-c-8bnzu_3dBkIdFmXHFpIGQWzwve_EL8dpHJwo

To claim this, I am signing this object:

View launch-tmux.sh
if [ -z "$TMUX" ] && [ -n "$SSH_TTY" ] && [[ $- =~ i ]]; then
tmux attach-session -t "$USER-ssh" 2> /dev/null || tmux new-session -s "$USER-ssh" || exit $?
exit
fi
@omasanori
omasanori / cpuinfo-after.log
Created Feb 24, 2019
Comparing the content of /proc/cpuinfo with Debian 9 and Coreboot 1f83e9d592f6be5a4fc36c7d21ae1410a2fbbdfe on ThinkPad X60s before and after installing intel-microcode package.
View cpuinfo-after.log
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 14
model name : Genuine Intel(R) CPU U1300 @ 1.06GHz
stepping : 8
microcode : 0x39
cpu MHz : 800.000
cache size : 2048 KB
physical id : 0
@omasanori
omasanori / monitor_temp.py
Last active Jun 22, 2018
Monitor the temparture of processors on Linux
View monitor_temp.py
#!/usr/bin/env python3
def get_temp(socket_id):
thermal_zone = '/sys/class/thermal/thermal_zone' + socket_id
with open(thermal_zone + '/temp') as temp:
return int(temp.read()) / 1000.0 # + 273.15
if __name__ == '__main__':
import json
import sys
@omasanori
omasanori / alibuild.log
Created Jul 10, 2017
Building Configuration with flpproto fails on CC7 when libcurl-devel is not installed
View alibuild.log
aliBuild can take the following packages from the system and will not build them:
FreeType
The following packages cannot be taken from the system and will be built:
Python-modules, sqlite, CMake, protobuf, Python, GCC-Toolchain, nanomsg, libpng, ZeroMQ, autotools, boost, GSL
Packages will be built in the following order:
- defaults-o2-daq@v1
- autotools@v1.5.0
- sqlite@v3.15.0
- GCC-Toolchain@v6.2.0-alice1
- ZeroMQ@v4.1.5
View test.tex
\documentclass[unicode]{beamer}
\usepackage[no-math,ipaex]{luatexja-preset}
\renewcommand{\kanjifamilydefault}{\gtdefault}
\usefonttheme{professionalfonts}
\usepackage{unicode-math}
\setmathfont{xits-math.otf}
\begin{document}
View REPORT.txt
src/api/fcntl.c: In function 'f':
src/api/fcntl.c:30:3: error: 'O_TTY_INIT' undeclared (first use in this function)
C(O_TTY_INIT)
^
src/api/fcntl.c:5:21: note: in definition of macro 'C'
#define C(n) switch(n){case n:;}
^
src/api/fcntl.c:30:3: note: each undeclared identifier is reported only once for each function it appears in
C(O_TTY_INIT)
^
@omasanori
omasanori / predef.sh
Last active Mar 31, 2016
An utility to check the name of predefined preprocessor macros and their values.
View predef.sh
echo | gcc -E -xc -dM - | sort | uniq
View should-this-ulgy-cast-be-punished-or-not.log
$ gcc --version | head -n1
gcc (Gentoo 4.9.3 p1.2, pie-0.6.3) 4.9.3
$ gcc -dumpmachine
x86_64-pc-linux-gnu
$ clang --version | head -n1
clang version 3.7.1 (tags/RELEASE_371/final)
$ clang -dumpmachine
x86_64-pc-linux-gnu
$ cat > test.c
#include <stdio.h>