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
#/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/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
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
\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
# https://stackoverflow.com/questions/23703417/can-mayavi-render-a-figure-scene-with-a-transparent-background | |
import numpy as np | |
from mayavi import mlab | |
import matplotlib.pyplot as plt | |
d = 3 | |
n = 100 | |
x = np.arange(-d, d, 2 * d / n) | |
y = np.arange(-d, d, 2 * d / n) |
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
defaults read /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin |
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
<?php | |
// https://wordpress.stackexchange.com/questions/211303/wp-cli-enabling-maintainance-mode | |
$upgrading = time(); |
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
pi = acos(-1.0) | |
tau = 2 * pi | |
deg2rad = pi / 180.0 | |
rad2deg = 180.0 / pi | |
procedure lonlat2xyz(lon, lat, x, y, z) | |
begin | |
x = cos(lon) * cos(lat) | |
y = sin(lon) * cos(lat) | |
z = sin(lat) |