Skip to content

Instantly share code, notes, and snippets.

@TakashiUNUMA
TakashiUNUMA / Makefile
Last active December 25, 2015 15:59
Makefile for compiling a LaTeX file by the use of XeLaTeX.
SHELL = /bin/sh
FILE0 = main
TEX = $(FILE0).tex
XDV = $(FILE0).xdv
PDF = $(FILE0).pdf
PDFOUT = $(FILE0)_final.pdf
FILE1 = handout
HTEX = $(FILE1).tex
HXDV = $(FILE1).xdv
#!/bin/sh
if test $# -lt 2 ; then
echo "USAGE: $(basename $0) [input pdf] [output eps]"
exit 2
fi
input=$1
output=$2
@TakashiUNUMA
TakashiUNUMA / get_data_from_JMA.sh
Last active December 31, 2015 00:19
A wrapper script for the sounding data of http://www.data.jma.go.jp/obd/stats/etrn/upper/index.php. The commands of awk and w3m are required to use this script. USAGE: get_data_from_JMA.sh [JSTTIME] [STATION NUMVER] [TYPE] Note: An undef value "///" is replaced with "-999." in this script.
#!/bin/sh
#
# wget wrapper script
#
# original script coded by Takashi Unuma, Kyoto Univ.
# Last modified: 2013/12/11
#
debug_level=100
if test $# -lt 2 ; then
@TakashiUNUMA
TakashiUNUMA / insert_fig_to_tex.sh
Created January 4, 2014 03:18
This script prints a LaTeX format that includes bounding box informations.
#!/bin/sh
if test $# -lt 1 ; then
echo "USAGE: sh $(basename $0) [figure(s)]"
exit 1
fi
infiles=$*
WIDTH="140mm"
DIR="pictures/"
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Derquinse Gist.GitHub Gadget">
<Require feature="dynamic-height" />
</ModulePrefs>
<UserPref name="gistId" display_name="Gist #" required="true" />
<Content type="html">
<![CDATA[
<div id="content_div">
#!/bin/sh
export INSTDIR=/usr/local/mpich2-1.4.1p1-intel
export CC=icc
export CXX=icpc
export CPP='icc -E'
export CXXCPP='icc -E'
export FC=ifort
export F77=ifort
#!/bin/sh
export INSTDIR=/usr/local/netcdf-3.6.3-intel
export FC=ifort
export F77=ifort
export CC=icc
export CXX=icpc
export CPP='icc -E'
export CXXCPP='icpc -E'
@TakashiUNUMA
TakashiUNUMA / htmlview.sh
Created May 31, 2014 10:02
あるディレクトリに保存されたすべて同じ大きさの画像を、HTML で閲覧するための shell script。
#!/bin/sh
width=400
height=309
echo '<HTML>'
echo '<HEAD>'
echo '<TITLE> HTML VIEWER </TITLE>'
echo '<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">'
echo '</HEAD>'
@TakashiUNUMA
TakashiUNUMA / Makefile
Created June 6, 2014 07:36
Makefile for compiling with NetCDF library.
#SHELL = /bin/sh
#-----------------------------------------------------------------------------
# NETCDF SECTION
#-----------------------------------------------------------------------------
# - netcdf3
OUTPUTINC = -I/usr/local/netcdf-3.6.3-gnu/include
OUTPUTLIB = -L/usr/local/netcdf-3.6.3-gnu/lib
LINKOPTS = -lnetcdf
# - netcdf4
@TakashiUNUMA
TakashiUNUMA / modify_boundingbox.sh
Created July 5, 2014 23:40
A shell script for modifying the bounding box of the input eps files using ghostscript.
#!/bin/sh
#
# modify_boundingbox.sh
#
# original script coded by Takashi Unuma, Kyoto Univ.
# last modified: 2014/07/06
#
# required commands: basename, gs, sed, and awk
#