Skip to content

Instantly share code, notes, and snippets.

View tsuwatch's full-sized avatar

Tomohiro Suwa tsuwatch

View GitHub Profile
@tsuwatch
tsuwatch / comment_screen.html
Created September 22, 2012 08:48
comment_screen.html
<html>
<head>
<title></title>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' type='text/javascript'></script>
</head>
<script type="text/javascript">
// コメントの場所を指定
function setPosition(id) {
var top = $('#nicoscreen').offset();
@tsuwatch
tsuwatch / main.coffee
Created October 4, 2012 07:15 — forked from mizchi/main.coffee
mmd.gl.enchant.js
enchant()
window.game = null
MODEL_PATH = 'model/Haku_Yowane.pmd'
MOTION_PATH = 'motion/kishimen.vmd'
GAME_WIDTH = 800
GAME_HEIGHT = 800
class MyScene3D extends Scene3D
constructor: ->
@tsuwatch
tsuwatch / fib.rb
Created October 18, 2012 08:31
fib.rb
def fib(n)
if n < 2
return n;
else
return fib(n-2) + fib(n-1)
end
end
@tsuwatch
tsuwatch / niconicocommentgetter.php
Created October 18, 2012 13:57 — forked from miyukki/niconicocommentgetter.php
Niconico Comment Getter
<?php
define('NICONICO_MAILADDRESS', '<アカウントアドレス>');
define('NICONICO_PASSWORD' , '<アカウントパスワード>');
$id = @$argv[1];
if(!$id) exit('Usage (sm|lv)[\d]+'.PHP_EOL);
if(strpos($id, 'sm') === 0) getVideoComment($id);
if(strpos($id, 'lv') === 0) getLiveComment($id);
if(strpos($id, 'co') === 0) getLiveComment($id);
@tsuwatch
tsuwatch / nicoGetFlv.php
Created November 25, 2012 17:10
ニコニコ動画のFLVファイルをDL
<?php
$data = array('mail' => 'your mail address', 'password' => 'your password');
$data = http_build_query($data);
$context = stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => implode("\r\n", array(
'Content-Type: application/x-www-form-urlencoded',
'Content-Length: ' . strlen($data)
@tsuwatch
tsuwatch / get_anime.py
Created May 18, 2013 08:30
anime mp4 downloader
from BeautifulSoup import BeautifulSoup
import urllib2
import urllib
import sys
import re
argc = len(sys.argv)
if (argc != 2):
print 'Usage: # python %s eyeonanime.com\'s url' % sys.argv[0]
quit()