This file contains hidden or 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> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<script src="http://aho.mu/demo/jsbin_live/highlight.js"></script> | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
var style = document.querySelector('style'), | |
output = document.getElementById('output'), |
This file contains hidden or 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
# 本当はLiveScript(.ls)だが、シンタックスハイライトの都合で.coffee | |
# ファイルを読み込む | |
err, files <-! fs.readdir source | |
if err then return console.log 'Error finding files: ' + err | |
# ファイルリストを回す | |
filename, fileIndex <-! files.forEach | |
console.log filename |
This file contains hidden or 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) { | |
'use strict'; | |
var TEMP_HAR_RESOURCE = '.har.tmp'; | |
var exec = require('child_process').exec, | |
YSLOW = require('yslow').YSLOW, | |
doc = require('jsdom').jsdom(), | |
util = grunt.utils || grunt.util, |
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ajax Page</title> | |
</head> | |
<body style="background-color: #fff;"> | |
<h1>Ajax的にナニかするよー</h1> | |
<div id="content"> | |
<p>loading...</p> | |
</div> |
This file contains hidden or 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
/*global module:false*/ | |
module.exports = function (grunt) { | |
grunt.initConfig({ | |
copy: { | |
js: { | |
files: { | |
'../public/js' : 'js/app-all.min.js' | |
}, | |
options: { |
This file contains hidden or 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 page = require('webpage').create(); | |
var url = 'http://localhost:1234/'; | |
page.viewportSize = { | |
width: 1024, | |
height: 768 | |
}; | |
page.settings.userAgent = 'I am Phantom'; | |
page.open(url, function (a, b, c) { | |
setTimeout(function() { | |
console.log(page.content); |
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<title>hmmm...?</title> | |
<meta name="viewport" content="width=device-width"> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script> | |
<style type="text/css"> | |
#js-geoloc { | |
font-size: 150%; |
This file contains hidden or 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
/** | |
* set background-image when slides changed | |
<section data-image="path/to/background"> | |
<!-- slide content --> | |
</section> | |
*/ | |
var stateBg = document.querySelector('.state-background'); | |
Reveal.addEventListener( 'slidechanged', function( event ) { |
This file contains hidden or 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
console.log('Loading a web page'); | |
var page = require('webpage').create(); | |
var url = 'http://localhost:1947/'; | |
page.viewportSize = { | |
width: 1024, | |
height: 768 | |
}; | |
page.open(url, function (status) { | |
//Page is loaded! | |
var iz, i = 0, queue = {}; |
This file contains hidden or 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
Around 2012/09/11 20:12:07, Detected M4.3 earthquake centered in Off the coast of Fukushima, 10km deep.Maximum scale will be Level 2. http://twiple.jp/e/5IeSgSud #NamazuAlert |