authenticationというgemを作りました。一言で言うと認証ライブラリです。 Railsは3.1くらいからhas_secure_passwordってパスワード用のちょっとした関数を使えるようになったので、ちょっとログイン周りの処理を書けば、dから始まる二郎系認証ライブラリを使わ... 続きを読む
ObjCがサクっと書けるコーディングTips 2013年4月21日日曜日 | Published in Objective-C, Tips | 0 コメント Tweet 最近よく使っている省略記法を紹介する。これらを使うとなんとなく気分がいい。 クラスメソッドの . (ドット)アクセス 実はクラスメソッドも... 続きを読む
最近、新人のテストコードを見る機会があり、ユニットテストの書き方について考える機会があった。ユニットテストはテンプレートみたいなものがあるので、それさえ押さえれば、誰でも簡単に書くことができる。 ここでは、その方法について紹介したい。サンプル... 続きを読む
Creating, testing and maintaining a large JavaScript code base is not easy — especially since great resources on how to do this are hard to find. This page is a collection of the best articles, videos and presentations we've found on the top... 続きを読む
SourceForge.JP Magazine注目記事 ハードディスクの中身を誤って消した場合のファイル復旧方法 ハードディスクを完全消去する「DBAN」のインストールと使い方 HDD/SSDの健康診断を行うS.M.A.R.T.対応ツール「CrystalDiskInfo」 の使い方 HDDやSSDなどの速度を計... 続きを読む
IntroductionIn this post we're going to explore writing Backbone.js applications with a Ruby back-end. To assist with this, we're going to use Sinatra – a DSL (domain specific language) for rapidly creating web applications in Ruby. Similar ... 続きを読む
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'boot.rb')) 続きを読む
Sinatra with Delayed Job on PostgreSQLがローカル(OS X Lion)で動きました。以下、備忘録です。 概要Sinatra上のウェブアプリケーションにバックグラウンドジョブを実装しました。バックグランドプロセスにはRailsプラグインとして有名なDelayed Job、バック... 続きを読む
simple, flexible, fun Mocha is a feature-rich JavaScript test framework running on node and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaugh... 続きを読む
今日話さないこと JavaScriptの基礎知識、jQueryの導入 気持ちいいUIやUXがうんちゃら CanvasやWebGLを使ったリッチでイケてるゲームの作り方 続きを読む
Managing Your Backbone Views With the State Pattern Jun 2nd, 2012 Yesterday I wrote a post to illustrate the concepts behind the State pattern (one of my all time favorite tools). If you’re new to this pattern and haven’t read my previous p... 続きを読む
This document is compiled from RubyFunctionalProgramming by Arnau Sanchez (tokland) Japanese version is also available. Table of Contents Introduction The theory Functional programming in Ruby Don't update variables Blocks as higher order fun... 続きを読む
You will need to use Casper fill() function. Below is an example which login to Facebook and print out your name after login. Note that you need to put in your username and password: var casper = require('casper').create({ verbose: true, logL... 続きを読む
README.md AASM - Ruby state machines This package contains AASM, a library for adding finite state machines to Ruby classes. AASM started as the acts_as_state_machine plugin but has evolved into a more generic library that no longer targets o... 続きを読む
README.rdoc Travis Build Status Synopsis transitions is a ruby state machine implementation. Installation Rails This goes into your Gemfile: gem "transitions", :require => ["transitions", "active_model/transitions"] … and this into your ORM ... 続きを読む
ActiveRecordを使っていると時々プログラム内でModelオブジェクトの値を変更してから、変更前の値が欲しくなったりすることがある。 そんなときはActiveModel::Dirtyのメソッドを使うとModelのオブジェクトに変更があった時に変更の情報を取得出来る。 # たとえ... 続きを読む
1.0.0 1.1.0 1.1.1 1.1.6 1.2.0 1.2.6 2.0.0 2.0.1 2.0.3 2.1.0 2.2.1 2.3.2 2.3.8 3.0.0 (0) 3.0.5 (0) 3.0.7 (0) 3.0.9 (-38) 3.1.0 (0) 3.2.1 (0) 3.2.3 (0) 3.2.8 (0) What's this? 続きを読む
2013年1月10日木曜日 vanityとchankoを使ってRailsで簡単安全にABテストをする vanityはRailsのABテスト用ライブラリ。導入が一番簡単っぽい。 元々はテキストとか画像をのABテストを行うためのもののようだが、 chankoという限定公開用のライブラリを使って、... 続きを読む
Prelude Welcome to my (in-progress) book about the Backbone.js framework for structuring JavaScript applications. It's released under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license meaning you can both grab a cop... 続きを読む
Why do we hate testing? How do we test JavaScript? How do we test Backbone.JS? (Credits to @searls for slides 6 through 12, used with permission). 続きを読む
Backbone.js Advent Calendarの16日目です。 新しい技術は興味はあるけど、主流にならない技術も多くて全部覚えるにはお腹いっぱいという皆さん。 私もこれはという技術を身につけて、一生食べて行けれたらと常々思っています。 そしてようやくこれはと思える技... 続きを読む
jQuery でのプログラミングの、基本的なことからプラグインを作るところまで、初心者の頃につまずいた部分を中心にまとめてみました。公式ドキュメントなどで使われている、イベントハンドラ、コールバックなどの専門用語も織り交ぜながら書きました。this や e... 続きを読む
Welcome Welcome to the CoffeeScript Cookbook! It’s a bit of a mess right now, and VERY lonely and empty in these pages. That’s where you come in. Head over to the Contributing page and see what you can do to help out! Contributions URGENTLY... 続きを読む
UX Spine Mobile strives to give your applications a native look and feel, providing the best user experience possible. HTML5 & CSS3 Use familiar web technologies, such as HTML5 and CSS3, to easily design and develop mobile applications. Spine... 続きを読む
Heroku is the easiest way to deploy, scale and maintain mobile applications.Mobile on Heroku Build an iOS App in 10 Minutes with AFIncrementalStore and the Core Data Buildpack Signup featured technologies Core Data Buildpack Generate REST API... 続きを読む
Backbonification: migrating a large JavaScript project from DOM spaghetti to Backbone.js We've all done it. Our code base has one huge monolithic file, packed full of JavaScript spaghetti. It's unwieldy, hard-to-debug, and has little to no se... 続きを読む
Backbone.sync: Overrides persistence storage with dummy function. This enables use of Model.destroy() without raising an error. Backbone.sync = function(method, model, success, error){ success(); } var Item = Backbone.Model.extend({ defaults:... 続きを読む
null, 長文Evernote便利です。画像とテキストをまとめて保存できて、リンクを貼れるのでとても便利です。以前はMhtmlを使っていましたが最近はすっかりEvernoteです。いくら便利でも限界はあります。どうしても自動化や手の届かない処理はプログラムで書きたく... 続きを読む
HTML5 Boilerplate is the professional badass's base HTML/CSS/JS template for a fast, robust and future-proof site. After more than two years in iterative development, you get the best of the best practices baked in: cross-browser normalizatio... 続きを読む
このブログとかでたまに無向だとか有向だとかのチャートの方じゃないグラフが書きたいと思うことがあるよ。でまさかこのご時世で今更VISIOとかあり得ないからGraphvizのdotファイルを書くことになるんだけどDOT言語は制御構造を持ってないから結局より高級な言... 続きを読む