This file contains 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 "Google Chrome" | |
view source of active tab of window 1 | |
repeat while loading of active tab of window 1 | |
delay 0.1 | |
end repeat | |
select all of active tab of window 1 | |
copy selection of active tab of window 1 | |
delete tab (active tab index of window 1) of window 1 | |
end tell |
This file contains 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
define af(r1, r2, c) { | |
auto defscale, t1, t2, total, freq, duty; | |
defscale = scale; | |
scale = 6; | |
t1 = l(2) * (r1 + r2) * c; | |
t2 = l(2) * r2 * c; | |
total = t1 + t2; | |
freq = 1 / total; | |
duty = t1 / total; |
This file contains 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/python | |
# -*- coding: utf-8 -*- | |
# Copyright : (c) SAEKI Yoshiyasu | |
# License : MIT-style license | |
# <http://www.opensource.org/licenses/mit-license.php> | |
# last updated: 2011/03/19 | |
import lxml.html | |
root = lxml.html.parse("http://www2.u-tokyo.ac.jp/erc/index.html") |
This file contains 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 "Google Chrome" | |
tell window 1 | |
set newTab to make new tab with properties {URL:"https://bitbucket.org/account/signin/"} | |
repeat while loading of active tab | |
delay 0.1 | |
end repeat | |
tell active tab | |
execute javascript "document.forms[1]['id_username'].value = 'bitbucket_mail@gmail.com'" | |
execute javascript "document.forms[1]['id_password'].value = 'bitbucket_password'" | |
execute javascript "document.forms[1].childNodes[8].childNodes[1].click()" |
This file contains 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[10pt]{tarticle} | |
% ... | |
\newcommand{\tsetpagesize}[2]{% | |
\usepackage[paperwidth=#2, paperheight=#1,% | |
top=1truemm, bottom=1truemm, left=1truemm, right=1truemm]{geometry}% | |
\special{papersize=#1,#2}% | |
} |
This file contains 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[10pt]{article} | |
\pagestyle{empty} | |
\def\kindlewidth{85.09truemm} | |
\def\kindleheight{111.76truemm} | |
\def\ipodtouchwidth{49.31truemm} | |
\def\ipodtouchheight{73.97truemm} |
This file contains 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
>>> from mercurial import ui, hg | |
>>> repo = hg.repository(ui=ui.ui(), path='.', create=True) | |
# create a repository | |
>>> repo | |
<mercurial.localrepo.localrepository object at 0x1019581d0> | |
>>> f = open("foo", "w") | |
>>> f.write("foofoo") | |
>>> f.close() | |
>>> repo.status(unknown=True) | |
([], [], [], [], ['foo'], [], []) |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <time.h> | |
#define MAX_NUM 1000 | |
int main() { | |
double x; | |
double rint_x, round_x; |
This file contains 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
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2011/05/07 | |
**/ | |
#include<stdio.h> | |
#include<stdlib.h> | |
#include <sys/event.h> |
This file contains 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/python | |
# -*- coding: utf-8 -*- | |
# Copyright : (c) SAEKI Yoshiyasu | |
# License : MIT-style license | |
# <http://www.opensource.org/licenses/mit-license.php> | |
# last updated: 2011/05/07 | |
import select | |
# import os |