Skip to content

Instantly share code, notes, and snippets.

vows = require 'vows'
assert = require 'assert'
test = vows.describe('ゼロでの割り算').addBatch
'任意の数をゼロで割った時' :
topic: -> 42 / 0
'無限大になる' : (topic) ->
assert.equal topic, Infinity
'ただし、ゼロをゼロで割った場合'
topic: -> 0/ 0
express = require "express"
xml2js = require 'xml2js'
_ = require "underscore"
request = require "request"
prettyDate = require "./pretty"
class Timeline
constructor: (feed)->
@title = feed.channel.title
@link = feed.channel.link
wsseHeader = require './lib/wsse'
request = require 'request'
# entry =
# url: 'http://d.hatena.ne.jp/naoya/#atompost'
# comment: "This is it"
# xml = """
# <entry xmlns="http://purl.org/atom/ns#">
# <title>dummy</title>
wsseHeader = require './lib/wsse'
request = require 'request'
entry =
url: 'http://d.hatena.ne.jp/naoya/#atompost'
comment: "This is it"
xml = """
<entry xmlns="http://purl.org/atom/ns#">
<title>dummy</title>
// Returns a copy of the image that has been transformed using the given affine transform and scaled to the new size
// The new image's orientation will be UIImageOrientationUp, regardless of the current image's orientation
// If the new size is not integral, it will be rounded up
+ (UIImage *)resizedImage:(CGSize)newSize
transform:(CGAffineTransform)transform
drawTransposed:(BOOL)transpose
interpolationQuality:(CGInterpolationQuality)quality
image:(UIImage*)image
hires:(BOOL)hires
{
@naoya
naoya / about.ejs
Created November 1, 2011 15:16
jquery-pjax example
<div class="hero-unit">
<h1>About me</h1>
<p>...</p>
</div>
@naoya
naoya / dqx.pl
Created September 29, 2012 06:11
#!/usr/bin/env perl
use strict;
use warnings;
package Acme::DQX::Level50;
use Test::More tests => 6;
use base qw/Class::Accessor/;
our @classes = qw/fighter cleric monk thief wizard trickster/;
our $level_cap = 50;
@naoya
naoya / markham-nolan-how-to-separate-fact-and-fiction-online.md
Created February 17, 2013 05:21
Gisted: Markham Nolan: How to separate fact and fiction online | Video on TED.com
@naoya
naoya / stdout-hook-ltsv-fluentdcasual-naoya.md
Created February 17, 2013 05:20
Gisted: stdout-hook と LTSV #fluentdcasual - naoyaのはてなダイアリー
@naoya
naoya / rubysource.md
Created February 17, 2013 05:21
Gisted: RubySource | Laurent Sansonetti on RubyMotion InternalsRubySource