- 著者
打田 旭宏
- ライセンス
- 更新日時
Sphinx の LaTeX 出力を利用するときに見栄えを凝るのに知っておくとよいかもしれない小技をまとめました。
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# CC0, dedicated to public domain by Akihiro Uchida | |
import argparse | |
import urllib2, os | |
from HTMLParser import HTMLParser | |
import re | |
import calendar | |
ARXIV_ID_RE = re.compile(r'arXiv:((\d\d)(\d\d)\.\d+)') |
#!/bin/sh | |
docker ps -q -f status=exited | xargs --no-run-if-empty docker rm | |
docker images -q -f dangling=true | xargs --no-run-if-empty docker rmi |
// GWLlosa's answer in http://stackoverflow.com/questions/521687/c-sharp-foreach-with-index | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace EnumerateTest { | |
class Program { | |
static void Main(string[] args) { | |
List<int> list = new List<int> {4, 2, 3, 1, 8}; |
# -*- cperl -*- | |
# latexmkrc | |
$pdflatex = 'pdflatex -8bit -etex -halt-on-error -synctex=1 %O %S'; | |
$pdf_mode = 1; | |
$bibtex_use = 1; | |
$clean_ext = '%R_flymake.aux %R_flymake.dvi %R_flymake.log %R_flymake.out'; | |
$clean_full_ext = 'bbl synctex.gz'; |
#include <iostream> | |
#include <boost/function.hpp> | |
#include <boost/bind.hpp> | |
#include <boost/random/mersenne_twister.hpp> | |
#include <boost/random/uniform_real_distribution.hpp> | |
#include <boost/random/normal_distribution.hpp> | |
int main(int argc, char* argv[]) | |
{ | |
size_t seed = 1234567890; |
打田 旭宏
Sphinx の LaTeX 出力を利用するときに見栄えを凝るのに知っておくとよいかもしれない小技をまとめました。
I hereby represent that all present, past and future contributions are governed by the Creative Commons Zero 1.0 Universal copyright statement, placing my contributions in the publicdomain. This entails that to the extent possible under law I waive all copyright and related or neighboring rights to the code or documents I contribute. I also represent that I have the authority to perform the above waiver with respect to the entirety of my contributions.
#!/bin/bash | |
# MacTeX uninstaller script based on pkgutil command | |
# by Akihiro Uchida, CC0 dedicated to the public domain | |
# see http://creativecommons.org/publicdomain/zero/1.0/ | |
IFS=$(echo -en "\n") | |
for pkg in $(pkgutil --pkgs|grep org.tug.mactex); do | |
volume="$(pkgutil --pkg-info "$pkg"|grep volume|cut -d' ' -f2-)" | |
location="$(pkgutil --pkg-info "$pkg"|grep location|cut -d' ' -f2-)" | |
echo "remove all of the files installed under the $pkg" | |
for file in $(pkgutil --files "$pkg"); do |
sphinx の mathjax 拡張に手を加えて簡単な TeX マクロを使えるようにしてみました。
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# CUI Downloader of "Command Line Tools for Xcode" | |
# by Akihiro Uchida, CC0 dedicated to the public domain | |
# see http://creativecommons.org/publicdomain/zero/1.0/ | |
import sys, os | |
import urllib, urllib2, cookielib | |
from getpass import getpass | |
from HTMLParser import HTMLParser |