Skip to content

Instantly share code, notes, and snippets.

@yusugomori
yusugomori / iphoneTouchScroll.coffee
Created April 1, 2012 12:47
iphoneTouchScroll.coffee
#
# javascripts/iphoneTouchScroll.coffee
#
class iPhoneTouchScroll
constructor: ->
@clientHeight = 0
@dataX = 0
@dataY = 0
@startX = 0
@yusugomori
yusugomori / hoverQueue.coffee
Created April 5, 2012 11:18
hoverQueue.coffee
#
# Usage
#
# **html**
# <a href="#" class="elem">
# hoverTrigger
# <div class="pop">
# In the pop
# </div>
# </a>
@yusugomori
yusugomori / application.coffee
Created April 6, 2012 08:29
config/application.coffee
#
# config/application.coffee
#
everyauth = require "everyauth"
class App extends Tower.Application
@configure ->
@use "favicon", Tower.publicPath + "/favicon.png"
@use "static", Tower.publicPath, maxAge: Tower.publicCacheDuration
@yusugomori
yusugomori / authentication.coffee
Created April 6, 2012 08:43
config/initializers/authentication.coffee
#
# config/initializers/authentication.coffee
#
everyauth = require "everyauth"
# Facebook App ID from config/credentials.coffee
unless Tower.env is 'production'
Tower.config.credentials.facebook.key = Tower.config.credentials.facebook.development.key
Tower.config.credentials.facebook.secret = Tower.config.credentials.facebook.development.secret
@yusugomori
yusugomori / user.coffee
Created April 6, 2012 08:47
app/models/user.coffee
#
# app/models/user.coffee
#
class App.User extends Tower.Model
@field "id", type: "Id"
@field "name", type: "String,"
@field "email", type: "String,"
@field "userId", type: "String,"
@timestamps()
@yusugomori
yusugomori / auth.coffee
Created April 10, 2012 04:03
User auth in SocketStream
#
# This gist contains both server side and client side scripts.
#
# Server:
# /server/rpc/auth.coffee
# /server/rpc/models/user.coffee
#
# Client:
# /client/code/modules/auth.coffee
# /client/code/app.coffee
@yusugomori
yusugomori / app.js
Created April 10, 2012 03:53
app.js
/*
* This gist contains /app.js and /config/index.js
*/
// My SocketStream app
var http = require('http')
, ss = require('socketstream')
, express = require('express')
, everyauth = require('everyauth');
#
# Life Game by CoffeeScript
# @author yusugomori
# @license http://yusugomori.com/license/mit The MIT License
#
# Usage:
# <body><div id="lifegame"></div></body>
#
# $ ->
# L = new Lifegame()
@yusugomori
yusugomori / bpnn.rb
Created April 26, 2012 17:48
bpnn.rb
#!/usr/bin/env ruby -Ku
# -*- coding: utf-8 -*-
srand(0)
class BPNN
def initialize(ni, nh, no)
@ni = ni + 1
@nh = nh
@no = no
###!
* jquery.pinterest.js - placing your images with Pinterest look
*
* @version 1.0.0
* @author yusugomori
* @license http://yusugomori.com/license/mit The MIT License
*
* More details on github: https://github.com/yusugomori/jQueryPinterest
###