Skip to content

Instantly share code, notes, and snippets.

View 5509's full-sized avatar

Kazunori Tokuda 5509

  • PixelGrid, Inc.
  • Tokyo, Japan
View GitHub Profile
@5509
5509 / scratch.txt
Created November 1, 2012 02:28
Grunt building tasks with "OS X 10.8 Notification Center"
// you execute "$ [sudo] gem install terminal-notifier" before using this
// https://github.com/alloy/terminal-notifier
var proc = require('child_process');
function showNotif(type, msg) {
var title = 'Grunt building task';
var activateId = null;
var output = null;
if ( type === 'ok' ) {
msg = 'all tasks are done.';
@5509
5509 / gist:4023430
Created November 6, 2012 08:13
Backbone.jsにあわせたAPI
GET: /api/entries (一覧取得 - collectionのfetchで取得する、JSONを取得
POST: /api/entries (新規作成 - collectionのcreateで作成する、JSONを取得
GET: /api/entries/:entry_id (エントリ取得 - modelのfetchで取得する、JSONを取得
PUT: /api/entries/:entry_id (エントリ更新 - modelのsaveで保存する、200を期待
DELETE: /api/entries/:entry_id (エントリ削除 - modelのdestroyで削除してcollectionからの削除される、200を期待
modelのJSON
{
@5509
5509 / gist:7096156
Last active June 27, 2024 14:28
念には念を ref: view-source:http://paby.info/
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
...
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
...
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>