Skip to content

Instantly share code, notes, and snippets.

/**
* Modify the parts you need to get it working.
*/
var should = require('should');
var request = require('../node_modules/request');
var io = require('socket.io-client');
var serverUrl = 'http://localhost';
@mori-dev
mori-dev / dayone.el
Created November 1, 2013 10:55
### 前提 * mustache.el * uuid.el ### ToDo * [ ] ELPA への登録
;;; dayone.el --- Utility script for Day One
;; Copyright (C) 2013 by mori-dev
;; Author: mori-dev <mori.dev.asdf@gmail.com>
;; URL: https://github.com/mori-dev
;; Version: 20131101.1951 todo
;; X-Original-Version: todo
;; Package-Requires: ((uuid "0.0.3") (mustache "0.22")) todo
class @MyMap extends GMaps
constructor: (params) ->
super(params)
AddMakerByDataAttr: (selector)->
$selector = $(selector)
@addMarker
lat: $selector.attr 'data-lat'
lng: $selector.attr 'data-lng'
var local = {};
local["^https://www.pivotaltracker.com/projects"] = [
style.register(<><![CDATA[
#main {
min-width: 1600px;
}
]]></>, style.XHTML)
];
@mori-dev
mori-dev / script.js
Created September 19, 2012 03:01
backbone.js のコレクションのビュー
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CoffeeScript - Backbone.js rollover</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<script src="../libs/jquery.min.js"></script>
<script src="../libs/underscore.js"></script>
<script src="../libs/backbone.js"></script>
<script src="scripts.js"></script>
@mori-dev
mori-dev / gist:3746936
Created September 19, 2012 00:30
Git Log of backbone.js
Commits in HEAD
7bfce6fe * origin/master origin/HEAD master Merge pull request #1658 from braddunbar/history-window
|\
a4243413 | * Fix #1653 - Ensure that `History` can be used outside of the browser.
|/
da18e002 * Merge branch 'master' of github.com:documentcloud/backbone
|\
161c3a21 | * Merge pull request #1656 from braddunbar/sortby-groupby
| |\
c344201f | | * Fix #1655 - sortBy & groupBy use attributes.
@mori-dev
mori-dev / gist:3395489
Created August 19, 2012 15:36
private-backup
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
# ■要件
#
# emacs で f12 キー押下で編集中のファイルをディレクトリ構造ごとバックアップしたい
# ターミナルから引数で指定したファイル/ディレクトリをディレクトリ構造ごとバックアップしたい
#
# ■使い方
#
*~
vendor/bundle
.DS_Store
config/initializers/clear_logs.rb
Gemfile.lock
Gemfile.local.rb
lib/tasks/myseed.rake
db/my_seeds.rb
coverage/
a.diff
@mori-dev
mori-dev / routes.rb
Created August 6, 2012 14:44 — forked from kozo002/routes.rb
confirmationを使う場合にRESTfulっぽくなるようにしてみた
resources :products, only: [:index, :show]
namespace :products do
resources :registrations, only: [:new, :create, :edit, :update]
resources :confirmations, only: [:show, :update] do
get :completion, on: :collection
end
end
namespace :admin do
@mori-dev
mori-dev / rspec-syntax-cheat-sheet.rb
Created August 5, 2012 06:56 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")