This file contains hidden or 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' | |
| exec = (require 'child_process').exec | |
| FILENAME = 'game' # write your game title. | |
| FILES = [ | |
| 'src/main.coffee', | |
| 'src/player.coffee', | |
| # write sourcecodes here. | |
| ] |
This file contains hidden or 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
| function! Cake() | |
| if filereadable('Cakefile') | |
| call system("cake compile") | cwindow | redraw! | |
| else | |
| silent CoffeeMake! -cb | cwindow | redraw! | |
| endif | |
| endfunction | |
| noremap <C-c> :call Cake()<CR> |
This file contains hidden or 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
| #!/usr/bin/env node | |
| reporter = require('nodeunit').reporters.default | |
| reporter.run(['test/test_calc.coffee',]) |
This file contains hidden or 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
| exports.testCalc = { | |
| setUp : (callback) -> | |
| @x = 10 | |
| @y = 20 | |
| callback() | |
| tearDown : (callback) -> | |
| callback() | |
| testSum : (test) -> | |
| sum = @x + @y | |
| test.equal(sum, 30) |
This file contains hidden or 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') | |
| class Server | |
| constructor : (port) -> | |
| http.createServer (req, res) -> | |
| res.writeHead 200, {'Content-Type', 'text/plain'} | |
| res.end "Hello, World!" | |
| .listen port | |
| console.log "Server is running at localhost:#{port}." | |
| new Server(12345) |
This file contains hidden or 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
| brew install mercurial | |
| brew install sdl | |
| brew install sdl_image | |
| brew install sdl_mixer | |
| brew install sdl_ttf | |
| brew install smpeg | |
| brew install portmidi | |
| pip install hg+http://bitbucket.org/pygame/pygame |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| # | |
| # shorten.py | |
| # created by giginet on 2012/04/18 | |
| # | |
| from urllib import quote | |
| from urllib2 import Request, HTTPError, urlopen | |
| import json | |
| API_URL = u'https://www.googleapis.com/urlshortener/v1/url' |
This file contains hidden or 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
| -*- coding: utf-8 -*- | |
| print u'こんにちはこんにちは!' |
This file contains hidden or 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
| enchant() | |
| class Shooting extends Game | |
| config : { | |
| WIDTH : 640, | |
| HEIGHT : 480, | |
| FPS : 30 | |
| } | |
| constructor : -> | |
| super @config.WIDTH, @config.HEIGHT | |
| @fps = @config.FPS |
This file contains hidden or 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
| require 'formula' | |
| class Hub < Formula | |
| url 'https://github.com/defunkt/hub/tarball/v1.10.1' | |
| homepage 'https://github.com/defunkt/hub#readme' | |
| head 'https://github.com/defunkt/hub.git' | |
| md5 'd3ff9bcf489466a408020867b77f1d4d' | |
| def install | |
| system "rake", "install", "prefix=#{prefix}" |