View gist:906840
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from lxml import etree | |
from StringIO import StringIO | |
str_html = """<p> | |
<em>aa</em>bb<em>cc</em> | |
</p>""" |
View nicovideolive4googlecalendar.js
(function(){ | |
try { | |
//定義 | |
var d = document,titles,airdate,url,url_cal; | |
//URLの確認 | |
url = location.toString(); | |
if( | |
(url.indexOf('http://live.nicovideo.jp/watch/lv') != 0) && | |
(url.indexOf('http://live.nicovideo.jp/gate/lv') != 0) |
View touchpad-on-off.sh
#!/bin/sh | |
# TouchPad Enable/Disable | |
# tested on ASRock Multibook G22 + Ubuntu 10.04 | |
myTouchPadDevice='SynPS/2 Synaptics TouchPad' | |
# How to get the device name | |
# $ xinput list | |
if xinput list "$myTouchPadDevice" >/dev/null 2>&1; then |
View gist:825214
#!bin/sh | |
#シンボリックリンクを除外したかったけれど無理だったorz スマートな方法は無いかな | |
#以下ボツネタ | |
#find ! -type l -print0 | xargs -0 lsattr | grep -Ev '^-----------------e-' |
View nhk-program-search.xml
<?xml version="1.0" encoding="UTF-8"?> | |
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"> | |
<ShortName>NHK 番組検索</ShortName> | |
<InputEncoding>UTF-8</InputEncoding> | |
<Url type="text/html" method="GET" template="http://search.nhk.or.jp/hensei/query.html"> | |
<Param name="area" value="001"/> | |
<Param name="date" value=""/> | |
<Param name="dateos" value="7"/> | |
<Param name="ch" value="21"/> | |
<Param name="ch" value="31"/> |
View getBanana.js
// Firebug 向け | |
// http://gdata.youtube.com/feeds/base/users/hukuroo214/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile で実行 | |
for(var e in Iterator(document.querySelectorAll('#feedContent > div.entry > h3 > a'))) | |
console.log(e[1].href.replace('http://www.youtube.com/watch?v=', '').replace('&feature=youtube_gdata', '') + ' - ' + e[1].textContent); |
View ClearHighlight4GoogleCache.js
// title : Clear Highlight for Google Cache | |
// description : | |
// uuid : 2b5baf09-434f-4036-9e4f-022476094531 | |
//bookmarklet | |
/* | |
javascript:(function(){if(window.location.hostname.indexOf("webcache.googleusercontent.com")===0){var a=window.location,b=encodeURI(decodeURI(a.href)),c=encodeURI(decodeURI(a.search)).split("&"),d=c[0].indexOf("+");if(d!==-1){var e=c[0].slice(0,d);b=b.replace(c[0],e);a.assign(b)}};})(); | |
*/ |
View getStation4Radiko.js
// Firebug 向け | |
// http://radiko.jp/timetable/ で実行 | |
for(var e in Iterator(document.querySelectorAll('#subNav > li > a'))) | |
console.log(e[1].href.slice(-3) + ' - ' + e[1].textContent); | |
/* 結果例 | |
TBS - TBSラジオ | |
QRR - 文化放送 | |
LFR - ニッポン放送 |
View gist:727452
#ボツ |
View ラブひな一括ダウンロード.sh
#!bin/zsh | |
seq 101 114 | sed -re 's/^1//g' | xargs -i wget -w 5 -t 1 -c -nc -O 'LH{}_hq.pdf' 'http://dl.j-comi.jp/download/book/1{}/hq' |
NewerOlder