Skip to content

Instantly share code, notes, and snippets.

@YungSang
YungSang / patch.userscript.tumblr.play.tbrl.js
Last active December 17, 2015 03:19
[Deprecated] Taberareloo の Play on Tumblr の Tumblr - Play Shortcutkey にパッチを当てる この実装は推奨されません。こちらで対応されています。https://github.com/Constellation/taberareloo/pull/209
// ==Taberareloo==
// {
// "name" : "Fix Play on Tumblr - Play"
// , "description" : "Fix Play on Tumblr - Play"
// , "include" : ["background", "content"]
// , "match" : ["http://www.tumblr.com/dashboard*"]
// , "version" : "0.2.0"
// , "downloadURL" : "https://gist.github.com/YungSang/5542820/raw/patch.userscript.tumblr.play.tbrl.js"
// }
// ==/Taberareloo==
@YungSang
YungSang / patch.model.googleplus.tbrl.js
Last active December 17, 2015 02:48
[Deprecated] Taberareloo 用 Google+ model and extractor パッチ。Google+ の新しい内部 API に対応させる。\ 8/15 にさらに別の修正が入ったので更新しました。 10/22 extractor 側の変更にも対応。 こちらに統合されました。 https://github.com/YungSang/patches-for-taberareloo/blob/master/extractors/extractor.reblog.googleplus.tbrl.js
// ==Taberareloo==
// {
// "name" : "Google+ model and extractor"
// , "description" : "New Google+ model and extractor"
// , "include" : ["background", "content"]
// , "match" : ["https://plus.google.com/*"]
// , "version" : "0.8.2"
// , "downloadURL" : "https://gist.github.com/YungSang/5538377/raw/patch.model.googleplus.tbrl.js"
// }
// ==/Taberareloo==
@YungSang
YungSang / extractor.nicovideo.js
Last active December 16, 2015 18:09
[Deprecated] Taberareloo 用のニコニコ動画 Extractor この実装は推奨されません。こちらで対応されています。https://github.com/Constellation/taberareloo/pull/194
(function() {
update(Extractors['Video - Nico Nico Douga'], {
extract : function(ctx) {
var externalPlayerURL = 'http://ext.nicovideo.jp/thumb_' + ctx.pathname.slice(1) + '?thumb_mode=swf&ap=1&c=1';
var video_id = ctx.pathname.extract(/watch\/(sm\d+)/);
return request('http://ext.nicovideo.jp/api/getthumbinfo/' + video_id).addCallback(function(res) {
var xml = res.responseXML;
var status = xml.getElementsByTagName('nicovideo_thumb_response')[0].getAttribute('status');
@YungSang
YungSang / resume.scpt
Created February 23, 2013 12:37
Volume Control for LoginHook and LogoutHook
set myPath to (path to me)
tell application "Finder"
set myFolder to (container of myPath) as string
end tell
set volumeScriptPath to myFolder & "volume.scpt"
set volumeScript to load script file volumeScriptPath
set volume (theVolume of volumeScript)
@YungSang
YungSang / Gemfile
Last active December 12, 2015 02:59
My procedure to use cucumber-chef v2.1.0.rc.6 with Vagrant
source "https://rubygems.org"
gem "cucumber-chef", :git => "git://github.com/Atalanta/cucumber-chef", :tag => "v2.1.0.rc.6"
@YungSang
YungSang / Gemfile
Created January 31, 2013 00:17
Gemfile for cucumber-chef v2.1.0.rc.5
source "https://rubygems.org"
gem "cucumber-chef", :git => "git://github.com/Atalanta/cucumber-chef", :tag => "v2.1.0.rc.5"
@YungSang
YungSang / private.xml
Created January 20, 2013 00:54
The private.xml for KeyRemap4MacBook to remap Caps Lock to Hyper (Control + Shift + Option + Command). First, you need to disable Caps Lock through Keyboard Preference and remap Caps Lock to PC Application(keycode:110) using PCKeybaordHack.
<?xml version="1.0"?>
<root>
<item>
<name>Remap PC Application to Hyper</name>
<appendix>OS X doesn't have a Hyper. This maps PC Application to Control + Shift + Option + Command.</appendix>
<identifier>pc_application_to_hyper</identifier>
<autogen>
--KeyToKey--
@YungSang
YungSang / utility.download.js
Created January 12, 2013 20:35
[Deprecated] Patch for Tombloo on Firefox 18 これを直接パッチディレクトリに突っ込んで再起動させるといいはず。 ※ この修正は Tombloo 0.4.33 で取り込まれました。
(function() {
addAround(grobal, 'download', function(proceed, args, self) {
try {
return proceed(args);
}
catch (e) {
return _download.apply(self, args);
}
});
Models.register({
name : 'LoveIt',
ICON : 'http://assets.loveit.com/assets/favicon.ico',
LINK : 'http://loveit.com/',
LOGIN_URL : 'http://loveit.com/me/login',
BOOKMARK_URL : 'http://loveit.com/loves/bookmarklet/create',
UPLOAD_URL : 'http://loveit.com/loves/upload/image',
POST_URL : 'http://loveit.com/loves/upload/create',
@YungSang
YungSang / youtube2srt.py
Created May 20, 2012 05:46
Convert a youtube transcript in srt subtitle (Python recipe)
#!/usr/bin/python
# -*- encoding:utf-8 -*-
"""Translate Google's Transcript into srt file.
Takes google's transcript filename as argument (xml extension required).
NB: to get google's transcript, use tihs URL:
http://video.google.com/timedtext?lang=en&v=VIDEO_ID
"""