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
/** | |
* get all users with specific role(s) | |
* | |
* @param int|int[] $role_id | |
* role id for role | |
* | |
* @return object[] | |
* user objects with given role(s) | |
*/ | |
function user_load_multiple_by_role($role_id) { |
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
# coding: utf-8 | |
""" | |
A phpmd linter for Sublime Text 2. | |
Since [SublimeLinter-phpmd](https://github.com/SublimeLinter/SublimeLinter-phpmd) | |
is made only for ST3 and cannot be used for ST2 and I maded this one. | |
Installation: |
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
javascript: (function() { | |
/* Amazon US の書籍詳細ページから Amazon JP の書籍詳細ページに飛ぶブックマークレット */ | |
/* htmlドキュメント内からISBNもしくはASINを探す */ | |
var bs = document.body.getElementsByTagName('b'); | |
for(var i = 0; i < bs.length; i++) { | |
if(bs[i].innerText == 'ISBN-10:') { | |
codeuniq = bs[i].parentNode.innerText.slice(9); | |
var code_is_isbn = true; | |
break; |
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
javascript:(function(){ | |
/* 神戸市図書館蔵書検索ブックマークレット */ | |
/* 選択された文字列を取得する なければダイアログで取得する */ | |
var kwd = ""+(window.getSelection?window.getSelection():document.getSelection()); | |
if(!kwd){ | |
kwd = prompt("Kobe lib search... ",""); | |
} | |
/* POST送信用のフォームを作成する */ |
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
# coding: utf-8 | |
# XMLをParseするためのクラスparseをインポート | |
from xml.etree.ElementTree import parse | |
# Google readerの登録フィードを読み込み、 | |
# body要素の子にあるすべてのoutline要素のリストを取得してelesに | |
tree = parse("google-reader-subscriptions.xml") | |
eles = tree.getroot().find("body").findall("outline") |
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
javascript:(function(){ | |
var q, location; | |
/* 選択された文字列を取得 */ | |
/* 選択されてなければダイアログから文字列を取得 */ | |
q = ""+(window.getSelection?window.getSelection():document.getSelection()); | |
if(!q) q = prompt("Amazon search... ",""); | |
/* urlエスケープした上でAmazonにリクエスト */ |
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
javascript:(function(){ | |
/* Amazon JP の書籍詳細ページから Amazon US の書籍詳細ページに飛ぶブックマークレット */ | |
/* htmlドキュメント内からISBNもしくはASINを探す */ | |
var bs = document.body.getElementsByTagName('b'); | |
for(var i=0;i<bs.length;i++){ | |
/* 洋書の場合はISBNを探す */ | |
if( bs[i].innerText == 'ISBN-10:'){ | |
codeuniq = bs[i].parentNode.innerText.slice(8); | |
var code_is_isbn = true; |
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
javascript: (function() { | |
/* Amazonの書籍詳細ページからISBNをキーにGoogle Booksに飛ぶブックマークレット */ | |
/* htmlドキュメント内からISBNを探す */ | |
var bs = document.body.getElementsByTagName('b'); | |
for(var i = 0; i < bs.length; i++) { | |
if(bs[i].innerText == 'ISBN-10:') { | |
codeuniq = bs[i].parentNode.innerText.slice(9); | |
break; | |
} |
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
<div id="archivePage"> | |
</div> | |
<!-- for archive page --> | |
<script> | |
<!-- | |
jQuery(function(){ | |
// 挿入対象DIVを取得 | |
// なければ終了 |
OlderNewer