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
$client = array( | |
'key' => '<key>', | |
'secret' => '<secret>' | |
); | |
$expires = 5; // In minutes | |
// output signed URL string | |
echo el_s3_getTemporaryLink($client['key'], $client['secret'], 'bucket', '<path:file-MD5>', '<filename>', $expires); | |
/** |
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
$client = array( | |
'key' => '<key>', | |
'secret' => '<secret>' | |
); | |
$expires = 5; // In minutes | |
// output signed URL string | |
echo el_s3_getTemporaryLink($client['key'], $client['secret'], 'bucket', '<path:file-MD5>', '<filename>', $expires); |
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
;!function($) { | |
var pluginName = 'myPlugin'; | |
$[pluginName] = function(el, op) { | |
this.options = op = $.extend({}, { | |
// default options here | |
}, op); | |
this.el = el; | |
}; |
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
/** | |
* delegate | |
* @param {Object} o target object | |
* @param function m target method | |
*/ | |
function delegate(o, m){ | |
return function(){ | |
return m.apply(o, arguments); | |
} | |
} |
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(w, d){ | |
var t = (d.selection) ? d.selection.createRange().text : | |
(d.getSelection) ? d.getSelection() : | |
(w.getSelection) ? w.getSelection() : ''; | |
(t == '') && (t = w.prompt('翻訳する文字を入力して下さい。', '')); | |
t ? w.open('http://eow.alc.co.jp/' + encodeURI(t) + '/UTF-8/', '_blank', '') : {}; | |
})(window, document); |
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
<?php | |
/** | |
* Simple RSS Reader | |
*/ | |
$url = 'http://hiromitz.jimdo.com/rss/blog'; | |
$rss = @simplexml_load_file($url); | |
foreach($rss->channel->item as $item) { | |
echo "<h2>". $item->title. "</h2>"; | |
echo "<div>". $item->description. "</div>"; |
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
<?php | |
/** | |
* Simple RSS Reader for ATOM | |
*/ | |
$url = 'http://feeds.feedburner.com/github'; // feed url | |
$rss = @simplexml_load_file($url); | |
foreach($rss->entry as $entry) { | |
echo "<h2>". $entry->title. "</h2>"; |
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
<?php | |
/** | |
* Abstract Model class | |
*/ | |
abstract class Abstract | |
{ | |
/** | |
* stored values |
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
;(function($){ | |
$.escapeHTML = function(val) { | |
return $("<div/>").text(val).html(); | |
}; | |
})(jQuery); |