Skip to content

Instantly share code, notes, and snippets.

import scala.scalajs.js
import scala.scalajs.js.Dynamic.{global, literal}
import js.annotation.JSExport
import scala.concurrent.{Promise, Future}
import scala.util.{Failure, Success}
import scala.scalajs.concurrent.JSExecutionContext.Implicits.runNow
@JSExport
object Main {
def defer:Future[Int] = {
watchMomentumScrolling = ($el) -> $.Deferred (d) =>
last = $el.scrollTop()
do watcher = =>
setTimeout =>
current = $el.scrollTop()
if last is current
d.resolve()
else
last = current
do watcher
createCube = ([x, y, z], color = obelisk.ColorPattern.GRAY) ->
new obelisk.Cube(
new obelisk.CubeDimension(x, y, z)
new obelisk.CubeColor().getByHorizontalColor(color)
)
createBrick = ([x, y], color = obelisk.ColorPattern.GRAY) ->
new obelisk.Brick(
new obelisk.BrickDimension(x, y)
new obelisk.SideColor().getByInnerColor(color)
true
db = new Momic.DB
name: 'app'
collections:
items:
itemType: String
name: String
value: Number
db.items.drop().then =>
a = db.items.insert({ itemType: 'weapon', name: 'ひのきのぼう', value: 10})
Momic = {}
class Momic.Collection
constructor: (@key, {@schema, @hasInstance, @hasPersistence, @endpoint, @autoSave}) ->
@autoSave ?= true
@hasPersistence ?= true
@hasInstance ?= true
unless @hasPersistence or @hasPersistence
throw new Error('hasInstance or hasPersistence must be true')
@_count = 0
p = new Promise (d) ->
throw 'error'
d()
uuid = -> ~~(Math.random() * 100000)
n = 1000000
list =
for i in [1..n]
id: uuid
find = (list, fn) ->
for i in list
ret = fn(i)
Component = require 'components/base/component'
Vue.component 'composition', module.exports = Component.extend
template: (require 'templates/composition/composition')()
created: ->
@$data.message = 'レシピを選んでください'
@$data.recipeIds = [
'IronIngot'
]
computed:

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing

@mizchi
mizchi / slide.md
Last active August 29, 2015 14:00

超チューニング反省会

mizchi

About

  • mizchi / Quipper
  • JavaScriptが専門でCSS書けないフロントエンドエンジニア
  • 元兄貴動画の工作員(2007年06月頃~2007年08月頃)
  • デスマ中(再来週がリリース)