Skip to content

Instantly share code, notes, and snippets.

Tomoki UDA t-uda

Block or report user

Report or block t-uda

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
View beamer-column-graphics.tex
\newcommand{\thickhrulefill}{\leavevmode\leaders\hrule depth-1.2pt height 3.2pt\hfill\kern0pt}
View file2.txt
もし条件 condition が成り立つならば hoge する.
t-uda / Hat.tex
Created Jan 7, 2014
$\left(\hat{ ... }\right)$ のカッコが大きくて気持ち悪い ref:
View Hat.tex
%% 縦に大きくならないハット付き文字を作る。
%%%% \hbox to 0pt : 幅 0pt のボックスを作る。
%%%% \phantom : その文字列の大きさで何も表示されないボックスを作る。
%%%% \raisebox : ボックスの位置・サイズを変更する。
%%%% \mathchoice : 数式モードに応じて条件分岐する。
{\hbox to 0pt{\phantom{$\displaystyle #1$} }\raisebox{0ex}[0pt][0pt]{$\displaystyle\hat{#1}$}}
{\hbox to 0pt{\phantom{$\textstyle #1$} }\raisebox{0ex}[0pt][0pt]{$\textstyle\hat{#1}$}}
{\hbox to 0pt{\phantom{$\scriptstyle #1$} }\raisebox{0ex}[0pt][0pt]{$\scriptstyle\hat{#1}$}}
{\hbox to 0pt{\phantom{$\scriptscriptstyle #1$}}\raisebox{0ex}[0pt][0pt]{$\scriptscriptstyle\hat{#1}$}}
View gist:5822869
#!/usr/bin/env ruby
$memo = [1]
JUMAN = 100000
def removeZeros(x)
while (x % 10 == 0) do
x /= 10
t-uda / bad-example.js
Created Oct 17, 2012
new 演算子を使いつつ可変長引数っぽいことをするには? ref:
View bad-example.js
function Hoge (a) {
this.x = a;
var a = new (function () { return Hoge.apply(this, ["hoge"]); })();
a instanceof Hoge; // => false
t-uda / .gitconfig
Created Aug 26, 2012
git show-branch を使っていないだなんて! ref:
View .gitconfig
sb = show-branch -a
br = branch
st = !git status -s && git stash list | cat
cfm = !git sb && git br && git st
t-uda /
Created Aug 12, 2012
boost::numeric::interval<int>(3): C++ Boost 区間演算ライブラリ 超越関数 ref:
$ g++ test-interval-transc-error.cpp
In file included from /usr/include/boost/numeric/interval.hpp:30:0,
from test-interval-transc-error.cpp:2:
/usr/include/boost/numeric/interval/transc.hpp: In function ‘boost::numeric::interval<T, Policies> boost::numeric::exp(const boost::numeric::interval<T, Policies>&) [with T = double, Policies = boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double> >]’:
test-interval-transc-error.cpp:12:30: instantiated from here
/usr/include/boost/numeric/interval/transc.hpp:34:64: error: ‘boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double> >::rounding’ has no member named ‘exp_down’
/usr/include/boost/numeric/interval/transc.hpp:34:64: error: ‘boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double
t-uda /
Created Aug 12, 2012
Debian で WPA-PSK(AES) 方式で無線接続 - wpa_supplicant 編 ref:
$ sudo aptitude install wpasupplicant
t-uda / MY_HOME
Created Aug 12, 2012
Debian で WPA-PSK(AES) 方式で無線接続 - NetworkManager 編 ref:
t-uda / .zshenv
Created Aug 1, 2012
zsh global alias でエラー出力だけを楽々パイプする ref:
View .zshenv
alias -g L="|& $PAGER"
alias -g E='2>&1 > /dev/null'
You can’t perform that action at this time.