Skip to content

Instantly share code, notes, and snippets.

View tsukumijima's full-sized avatar
📺
DTV

tsukumi tsukumijima

📺
DTV
View GitHub Profile
@akisute
akisute / BPPrivateWebView.h
Created September 12, 2011 00:40
An UIWebView subclass which uses WebKit private APIs to delegate authentications.
//
// BPPrivateWebView.h
// BPUI
//
// Created by akisute on 11/09/11.
//
/*
Copyright (c) 2011 Masashi Ono.
Permission is hereby granted, free of charge, to any person obtaining a copy of
@youzaka
youzaka / gist:1281577
Created October 12, 2011 15:46
保存したtsファイルでなく、recpt1から直接Transport Streamをいじる
#/usr/bin/env python
# coding: utf-8
from subprocess import Popen, PIPE
import array
import itertools
import shlex
def stream(ch):
a = Popen(shlex.split("recpt1 {:d} - -".format(ch)), stdout=PIPE)
@youzaka
youzaka / captiondumper.py
Created December 31, 2011 15:12
字幕ダンプ
#!/usr/bin/env python
import hashlib
from collections import defaultdict
from io import BufferedReader, FileIO
from aribgaiji import GAIJI_MAP
"""
TSファイルから字幕を取り出すスクリプト。
@farhadi
farhadi / rc4.js
Created March 24, 2012 17:09
RC4 encryption in javascript and php
/*
* RC4 symmetric cipher encryption/decryption
*
* @license Public Domain
* @param string key - secret key for encryption/decryption
* @param string str - string to be encrypted/decrypted
* @return string
*/
function rc4(key, str) {
var s = [], j = 0, x, res = '';
@shokai
shokai / ignore.sh
Created July 7, 2012 13:58
放送禁止用語リスト
curl http://monoroch.net/kinshi/kinshi.csv | nkf -u | grep '^"' | ruby -lane 'puts $_.split(/,/)[0].scan(/"(.+)"/)[0]' | sort | uniq
@Zirak
Zirak / jhr.js
Created July 20, 2012 15:44
JSONHttpRequest
//this is a tiny helper method for making JSON Http Requests
//if you want a more comprehensive solution, write it yourself
//
//the callback function will receive two arguments: the response,
// parsed as JSON, and the xhr object used inside jhr, with an added
// responseJSON property (you can probably guess what it is)
//
//this always sends a POST request, and the data is always serialized to JSON
//
//returns the xhr object used
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@youzaka
youzaka / gist:3683870
Created September 9, 2012 11:20
前番組のSD部分をカット
#!/usr/bin/env python3.1
import sys
from itertools import dropwhile
from ariblib import TransportStreamFile
from ariblib.packet import pid
output = open(sys.argv[2], 'wb')
with TransportStreamFile(sys.argv[1]) as ts:
# SDを捨ててHDを残す場合。逆に前番組のHDを捨ててSDを残す場合は4 (ARIB-STD-B10 第2部第6章 表6-60)
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@uhfx
uhfx / gist:3922268
Last active July 22, 2023 15:01
Twitter公式/非公式クライアントのコンシューマキー

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg