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 BitmapData = (function() { | |
function BitmapData(width, height) { | |
this.width = width; | |
this.height = height; | |
this.canvas = document.createElement('canvas'); | |
this.canvas.setAttribute('width', this.width + 'px'); | |
this.canvas.setAttribute('height', this.height + 'px'); |
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
{ | |
houses: [ | |
{ | |
name: "なんとかライブハウス", | |
lat: 11.111, | |
lng: 99.999, | |
landmarks: [ | |
{ | |
name: "なんとか交差点", |
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
0.1 : 25 | |
0.2 : 33 | |
0.3 : 4C | |
0.4 : 66 | |
0.5 : 7F | |
0.6 : 99 | |
0.7 : B2 | |
0.8 : CC | |
0.9 : E5 |
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
html, body { | |
width: 100%; | |
height: 100%; | |
min-height: 100%; | |
margin: 0; | |
padding: 0; | |
background: #333; | |
} | |
#workspace { |
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
$(function () { | |
var $win = $(window); | |
var $doc = $(document); | |
var $body = $('body'); | |
var winWidth = $win.width(); | |
var winHeight = $win.height(); | |
var $vertical = $('<div/>').css({ | |
position: 'absolute', | |
top: 0, | |
left: winWidth * 0.5, |
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
body { | |
background: #ccc; | |
} |
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
Backbone.Shape = {}; | |
Backbone.Shape.Rect = Backbone.View.extend({ | |
className: 'shape rect', | |
isClosed: false, | |
paper: null, | |
shape: null, |
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
$(document).on('keydown', function(event) { | |
if ((event.which == 115 || event.which == 83) && (event.ctrlKey || event.metaKey) || (event.which == 19)) { | |
event.preventDefault(); | |
// do something | |
return false; | |
} | |
return true; | |
}); |
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
(function() { | |
var map = {}; | |
var elems = document.querySelectorAll('h1, h2, h3, h4, h5, h6, h7, p, li, dt, dd'); | |
var cid; | |
var text; | |
for (var i = 0, iz = elems.length; i < iz; i++) { | |
cid = 'c' + i; | |
elems[i].setAttribute('contenteditable', 'true'); | |
elems[i].setAttribute('data-cid', cid); |
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
to joinList(aList, delimiter) | |
set retVal to "" | |
set prevDelimiter to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to delimiter | |
set retVal to aList as string | |
set AppleScript's text item delimiters to prevDelimiter | |
return retVal | |
end joinList | |
on run {input, parameters} |