Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block tenomoto

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
tenomoto /
Last active Aug 22, 2019
Install OCaml and Owl on FreeBSD

This gist describes steps to install the latest version of OCaml and Owl on FreeBSD. Tested with FreeBSD 12.0-RELEASE-p9 on Hyper-V/Windows 10 Pro 1903.

Install opam

Install opam as described How to install opan. EDIT the first line may not work. Install opam with pkg.

sh <(curl -sL
opam init
eval $(opam env)
tenomoto / units.markdown
Created Jul 12, 2019
Install R package units on Mac
View units.markdown
  • udunits2 is installed with MacPorts
$ curl -O
$ sudo R CMD INSTALL units_0.6-0.tar.gz --configure-args='--with-udunits2-include=/opt/local/include/udunits2 --with-udunits2-lib=/opt/local/lib'
tenomoto / nmdash.ahk
Created Feb 17, 2019
Send en- and em-dash
View nmdash.ahk
!-::Send {U+2013}
+!-::Send {U+2014}
tenomoto /
Last active Dec 23, 2018
add password reset to django admin
# use console backend for development
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# use admin site to login
LOGIN_URL = '/admin/'
tenomoto /
Created Nov 9, 2018
Convert JMA Radar-AMeDAS in GRIB2 to netcdf
tar xf ${fname}.tar
wgrib2 ${fname%__grib2}_Ggis1km_Prr10lv_ANAL_grib2.bin -netcdf ${hhmm}.nc
tenomoto / Animation.ipynb
Last active Oct 6, 2018
Animate pcolormesh and scatter
View Animation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
tenomoto /
Last active Oct 7, 2018
Add read permission to files and directories and execute only to directories
# a: all
# =: reset
# r: read
# X: execute excluding files
# u: user (owner)
# +: add
# w: write
chmod -R a=rX,u+w directory
tenomoto /
Created Sep 28, 2018
Processor information of Mac
sysctl -n machdep.cpu.brand_string
system_profiler SPHardwareDataType
tenomoto / rotate.ncl
Created Feb 26, 2018
Calculate tangential and radial winds by locating the typhoon centre at the North Pole
View rotate.ncl
pi = acos(-1.0)
tau = 2 * pi
deg2rad = pi / 180.0
rad2deg = 180.0 / pi
procedure lonlat2xyz(lon, lat, x, y, z)
x = cos(lon) * cos(lat)
y = sin(lon) * cos(lat)
z = sin(lat)
tenomoto / .maintenance
Created Dec 24, 2017
Set WordPress into maintenance mode
View .maintenance
$upgrading = time();
You can’t perform that action at this time.