This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.topbar | |
div.container.fixed | |
h3.logo | |
a(href='') GREE | |
ul | |
li.active | |
a(href='') Home | |
li | |
a(href='') Mail | |
li |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sys = require 'sys' | |
path = require 'path' | |
fs = require 'fs' | |
argv = require('optimist').boolean('m').argv | |
if not argv._[0] | |
process.exit -1 | |
p = require.resolve argv._[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http = require 'http' | |
sys = require 'sys' | |
EventEmitter = require('events').EventEmitter | |
mongodb = require 'mongodb' | |
class Twitter extends EventEmitter | |
constructor: (path, name, pass) -> | |
@path = path | |
@name = name | |
@pass = pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vows = require 'vows' | |
assert = require 'assert' | |
test = vows.describe('ゼロでの割り算').addBatch | |
'任意の数をゼロで割った時' : | |
topic: -> 42 / 0 | |
'無限大になる' : (topic) -> | |
assert.equal topic, Infinity | |
'ただし、ゼロをゼロで割った場合' | |
topic: -> 0/ 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jsdom = require 'jsdom' | |
jsdom.env | |
html: 'http://b.hatena.ne.jp/articles/201110/6114' | |
scripts: [ 'http://code.jquery.com/jquery-1.6.4.min.js' ] | |
done: (errors, window) -> | |
$ = window.$ | |
og = {} | |
$('meta[property^="og:"]').each () -> | |
og[ $(@).attr('property').match(/og:(.+)$/)[1] ] = $(@).attr 'content' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
{ |
OlderNewer