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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="./jquery-1.10.2.min.js"></script> | |
<script src="../dest/jquery.equalrowheights.js"></script> | |
<script> | |
$(function() { |
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($){ | |
/** | |
* LineUp | |
* ------ | |
* Fix heights of the cols in the same row | |
* | |
* @class | |
* @param String selector | |
* @param Object option |
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
/** | |
* Grunt Task : phps | |
* ----------------- | |
* Run php built-in server | |
*/ | |
module.exports = function(grunt) { | |
grunt.registerMultiTask("phps", "", function() { | |
var exec, cmd, options; |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
.demo { | |
height: 3em; | |
line-height: 1.5em; | |
overflow: hidden; |
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
module.exports = function(grunt){ | |
var path = require("path"), | |
_ = grunt.util._; | |
/** | |
* Resolve dest and src files' path | |
* @param {String} file | |
* @returns {Object} | |
*/ |
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
var lottery = function(data, rate, times){ | |
var source = []; | |
rate = rate || (function(){ | |
var i, rate; | |
i = data.length; | |
rate = []; | |
while(i--){ | |
rate.push(1); | |
} | |
return rate; |
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
#!/usr/bin/ruby | |
class MkPasswd | |
def initialize | |
@defaultOption = { | |
'length' => 8, | |
'useNumeric' => true, | |
'useUpperCase' => true, | |
'useSymbol' => 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
#!/usr/bin/ruby | |
require "open-uri" | |
require "rss" | |
begin | |
rss = open( "<feed url here!>" ){ |f| | |
RSS::Parser.parse( f.read ) | |
} | |
rss.channel.items.each{ |r| |
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 | |
// for example, from RSS | |
$dom = DOMDocument::loadXML( $string_stored_xml ); | |
$entries = array(); | |
foreach( $dom->getElementsByTagname("item") as $item ){ | |
$entry = array(); | |
foreach( $item->childNodes as $node ){ | |
if( $node->nodeType === 1 ){ | |
$entry[ $node->nodeName ] = $node->nodeValue; |
OlderNewer