This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[11pt,a4paper,uplatex,dvipdfmx]{ujarticle} | |
\usepackage{pgfgantt} | |
\begin{ganttchart}[ | |
hgrid, vgrid, | |
y unit chart = 0.8cm, | |
title height = 1, | |
y unit title = 0.6cm]{1}{24} | |
\gantttitle{H30}{12} \gantttitle{H31}{12}\\ | |
\gantttitlelist{4,...,12}{1} \gantttitlelist{1,2,3}{1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "QuickTime Player 7" | |
activate | |
set firstFile to choose file with prompt "Choose first image" | |
open image sequence firstFile seconds per frame 2 | |
-- open image sequence firstFile frames per second 2 | |
save document 1 as self contained | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# synopsis: pdf2ps foo.pdf | |
# | |
FILENAME=$1 | |
case $0 in | |
*pdf2png) DIRNAME=${1%.pdf};; | |
*ps2png) DIRNAME=${1%.ps};; | |
esac | |
OPTS="-trim $2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
in=$1 | |
n=$2 | |
sed -e " | |
s|N|${n}| | |
s|PDF|${in}| | |
" template.tex > foo.tex | |
pdflatex foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ ! -d pdf ]; then | |
echo "put PDF in pdf" | |
fi | |
if [ ! -d pdf_not_embedded ]; then | |
mkdir pdf_not_embedded | |
fi | |
cd pdf | |
for f in *.pdf; do | |
isEmb=`pdffonts ${f} | awk '$4=="no" {print "no"}'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# xinput set-prop device property value [...] | |
# device: 10 indentified with `xinput list` | |
# property: 272 or Evdev Scrolling Distance indentified with `xinput list-props device` | |
# value: -1 1 1 changed from 1 1 1 | |
$ xinput set-prop 10 272 -1 1 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
# http://unix.stackexchange.com/questions/48672/remove-comma-between-the-quotes-only-in-a-comma-delimited-file | |
BEGIN { | |
FS = "\"" | |
OFS = "" | |
} | |
{ | |
for (i = 2; i <= NF; i += 2) { | |
gsub(",", "", $i) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
incrh () { | |
# Arguments | |
# 1: yyyymmddhh | |
# 2: dh | |
yyyymmddhh=$1 | |
dh=$2 | |
hour2sec=3600 | |
t0=`date -jf "%Y%m%d%H%M%S" ${yyyymmddhh}0000 "+%s"` | |
dh=`expr $dh \* $hour2sec` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env octave -qf | |
function y = f(x) | |
# the maximum of kci = sqrt((mu/2 - tanh mu/2)(mu/2 - cot mu/2)) is found by | |
# finding the zero of the derivative of the inside of sqrt. | |
y = x - (tanh(0.5*x) + coth(0.5*x)) - 0.5 * x * (1/(cosh(0.5*x))^2 - 1/(sinh(0.5*x))^2); | |
endfunction | |
format long | |
fsolve("f", 3.2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env octave -qf | |
function y = f(x) | |
y = coth(0.5*x) - 0.5*x; | |
endfunction | |
format long | |
fsolve("f", 1.0) |